when i use laravel cron api "liebig/cron"
Route::get('/cron/run/c68pd2s4e363221a3064e8807rrt342', function () {
Cron::add('example1', '* * * * *', function() {
$test = new Test();
$test->name='aaa';
$test->save();
});
$report = Cron::run();
print_r($report);
});
output: Array ( [rundate] => 1400059503 [runtime] => -1 )
=>this show me when i go to url path "/cron/run/c68pd2s4e363221a3064e8807rrt342"
Is this error or what ?
How can i test it in windows ?
thanks
runtime value -1 means that you have a cron job already running. So if you want to run same cron job again at the same time then you need to change the value of preventoverlapping to false. So that it can be run again.
You can test it through command prompt as well by using artisan command artisan cron:run