mardi 29 décembre 2015

Laravel 5 Task Scheduling runs a task evey minute, regardless of method invoked

I'm puzzled by a weird Laravel 5 behaviour. I added this to the \app\Console\Kernel.php:

protected function schedule(Schedule $schedule)
{
    //$schedule->command('inspire')->hourly();
    $schedule->command(Utilsclass::log_line("CROM JOB EXECUTED @ ".date('l jS \of F Y h:i:s A')))->monthly();
}

and I expect to see an activity on my log once a month, but this is what I get on log.txt:

CROM JOB EXECUTED @ Tuesday 29th of December 2015 03:32:01 PM

CROM JOB EXECUTED @ Tuesday 29th of December 2015 03:33:01 PM

CROM JOB EXECUTED @ Tuesday 29th of December 2015 03:34:01 PM

CROM JOB EXECUTED @ Tuesday 29th of December 2015 03:35:01 PM

CROM JOB EXECUTED @ Tuesday 29th of December 2015 03:36:01 PM

CROM JOB EXECUTED @ Tuesday 29th of December 2015 03:37:01 PM

CROM JOB EXECUTED @ Tuesday 29th of December 2015 03:38:02 PM

CROM JOB EXECUTED @ Tuesday 29th of December 2015 03:39:01 PM

CROM JOB EXECUTED @ Tuesday 29th of December 2015 03:40:01 PM

so every minute, regardless of the method used. In fact using daily() or hourly() makes no difference at all.

Besides being quite new to Laravel I don't know how to hunt down a problem, which seems something like a bug to me...

Any help?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1RPM1sX
via IFTTT

Aucun commentaire:

Enregistrer un commentaire