I want to perform certain job exactly at round times, precisely every 30 minutes, for example:
- 00:00
- 00:30
- 01:00
- ...
- 12:00
- 12:30
- 13:00
- ...
In the Kernel.php
, I have this job...
$schedule->command('mycommand:sender')
->everyThirtyMinutes();
... and in in the crontab
, I have this command...
* * * * * cd /www/webapp && php artisan schedule:run >> /dev/null 2>&1
Apparently everything is ok, but if I stop the service or restart the server, this instructions, either in Kernel
or even inCrontab
, is correct for, for example, the server or service became available, at "12:29", I know the command will execute from "minute to minute", but "something" from these instructions will know that the next execution "should" be at 12:30 or the way it is, will run "30 minutes" after 12:29, therefore, 12:59?
Although it may seem irrelevant, but I have tasks in my system, that the needs to perform at these "round times", because the task "execution time" determines what will be performed.