shinyMao shinyMao - 1 year ago 84
PHP Question

Laravel: the time for job queue

With Laravel, I would like to make a job queue each 3 months ! So I would like to check.

$schedule->command('emails:send')->monthly()->monthly()->monthly()->when(function () {
return true;

Can I write like above?

Answer Source

Using monthly() three time won't work.

You will have to use crontab syntax to make a job run 'every three month'

Something like:

$schedule->command('emails:send')->cron('* * * */3');

Double check the crontab entry with online tools such as cronmaker.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download