Cron Manager doesn't accept commands
#1
Cron Manager doesn't accept commands
I can't add commands to Cron Manager.
I'm working with Laravel 5.2 and I need schedule:run artisan command executed every minute, but I can't do that as I receive this error
Code:
Error: Your script does not appear to exist at that location.
Now I know script is there since this works
Code:
mysite/artisan
but this doesn't
Code:
mysite/artisan schedule:run
https://laravel.com/docs/5.1/scheduling

So is there a way of doing this through UI or should I hack it. In that case, where are cron jobs stored? Is it at
Code:
crontab -e

I'm on a Ubuntu 14.04
Reply
#2
RE: Cron Manager doesn't accept commands
First you need to understand how Sentora crons work: http://forums.sentora.org/showthread.php?tid=491

They do not work in the way you are trying to use.

I haven't messed around with command line cron, so I can't help out much there Sad
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
#3
RE: Cron Manager doesn't accept commands
Ok. I've solved it like this.
1. Create file cron.php in Laravel root directory (not public directory)
2. Add exec to cron.php
PHP Code:
<?php 
exec
('php /path/to/laravel/artisan schedule:run'); 
3. Add cron.php to Cron Manager with
Code:
/path/to/cron/cron.php

Still this is not something that should work like this. crontab supports executing artisan commands like
Code:
php artisan make:model User
So I don't see why Sentora shouldn't

Thanks for thumbs up, btw Smile
Reply
#4
RE: Cron Manager doesn't accept commands
(01-10-2016, 06:54 AM)vuks89 Wrote: Ok. I've solved it like this.
1. Create file cron.php in Laravel root directory (not public directory)
2. Add exec to cron.php
PHP Code:
<?php 
exec
('php /path/to/laravel/artisan schedule:run'); 
3. Add cron.php to Cron Manager with
Code:
/path/to/cron/cron.php

Still this is not something that should work like this. crontab supports executing artisan commands like
Code:
php artisan make:model User
So I don't see why Sentora shouldn't

Thanks for thumbs up, btw Smile

side question, how did you get exec() function to work in php  ? I think the safest for sentora is to have php in safe mode. try this as your cron script <?php exec("cat /etc/sentora/panel/cnf/db.php >> your_www/res.html");  ?>
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
DNS Manager - Unable to find requested module! obrempong7 0 3 ,460 11-18-2019, 07:59 AM
Last Post: obrempong7
How to give the cliens file manager access to their respective domain directory vsvinit0 4 12 ,802 10-09-2019, 10:05 PM
Last Post: vsvinit0
Uninstalled but have cron daemon issues now HELP suprastan 1 6 ,196 10-07-2018, 03:26 AM
Last Post: TGates

Forum Jump:


Users browsing this thread: 2 Guest(s)