I need to run some data update functions each hours 15 minutes. For example:
- 12:15
- 13:15
- 14:15
- 15:15
How to create schedule for it? I tried something like $schedule->command('stats:refresh')->hourly()->at(':12');
but didn’t work.
I need to run some data update functions each hours 15 minutes. For example:
How to create schedule for it? I tried something like $schedule->command('stats:refresh')->hourly()->at(':12');
but didn’t work.
Try something like $schedule->command('stats:refresh')->cron('15 0-23 * * * *')
Cron uses 5 asterisks as arguments. I've made a pull request, because I thought there is a mistake in Laravel documentation: https://github.com/laravel/docs/pull/2166
But here's answer from main Laravel developer:
There is an optional 6th "year" argument available: http://www.nncron.ru/help/EN/working/cron-format.htm
If you click the last link, you'll see description of which one of the six asterisks.
You can use
Every star from left to right refers to
please take look at : http://maxoffsky.com/code-blog/practical-laravel-using-cron-jobs-in-laravel/