You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am able to execute the command in Terminal like this:
php artisan doSomething
Is the followings correct to execute the command within the cron?
This is my global.php:
Event::listen('cron.collectJobs', function() {
Cron::add('doSomething', '* * * * *', function() {
// Run every minute
Artisan::call('doSomething');
return null;
});
});
But php artisan cron:run always return -1:
+------------+---------+----------+--------+------+
| Run date | In time | Run time | Errors | Jobs |
+------------+---------+----------+--------+------+
| 1402831170 | -1 | -1 | 0 | 0 |
+------------+---------+----------+--------+------+
The text was updated successfully, but these errors were encountered:
I am able to execute the command in Terminal like this:
php artisan doSomething
Is the followings correct to execute the command within the cron?
This is my global.php:
Event::listen('cron.collectJobs', function() {
Cron::add('doSomething', '* * * * *', function() {
// Run every minute
Artisan::call('doSomething');
return null;
});
});
But php artisan cron:run always return -1:
+------------+---------+----------+--------+------+
| Run date | In time | Run time | Errors | Jobs |
+------------+---------+----------+--------+------+
| 1402831170 | -1 | -1 | 0 | 0 |
+------------+---------+----------+--------+------+
The text was updated successfully, but these errors were encountered: