简体   繁体   English

Laravel:工作队列的时间

[英]Laravel: the time for job queue

With Laravel, I would like to make a job queue each 3 months ! 有了Laravel,我想每3个月做一次工作! So I would like to check. 所以我想查一下。

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

Can I write like above? 我可以这样写吗?

Using monthly() three time won't work. 使用monthly()三次将无法正常工作。

You will have to use crontab syntax to make a job run 'every three month' 您将不得不使用crontab语法来“每三个月”运行一次作业

Something like: 就像是:

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

Double check the crontab entry with online tools such as cronmaker . 使用cronmaker等在线工具仔细检查crontab条目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM