繁体   English   中英

Laravel:工作队列的时间

[英]Laravel: the time for job queue

有了Laravel,我想每3个月做一次工作! 所以我想查一下。

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

我可以这样写吗?

使用monthly()三次将无法正常工作。

您将不得不使用crontab语法来“每三个月”运行一次作业

就像是:

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

使用cronmaker等在线工具仔细检查crontab条目。

暂无
暂无

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

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