I am using the liebig / cron package to work cron in my project,
I correctly completed the installation process of this package,
And here is my code
Route::get('/cron/run/cronjob123', function () {
Cron::add('example1', '* * * * *', function() {
echo 'success'; die;
return null;
});
$report = Cron::run();
});
Now I work in localhost, so when I enter the url myproject / cron / run / cronjob123 It should display success
But the execution flow will be $ report directly
And this report has this result,
Array ( [rundate] => 1398489241 [runtime] => -1 )
I do not understand where I am mistaken.
source
share