Magento 2 Cron注意 - 逗号分隔值

发布于 2025-01-26 22:02:31 字数 901 浏览 3 评论 0原文

我正在尝试设置一份Cron工作,以便每个月下午4:00 在上跑步

我想到了:

https://crontab.guru/#00_16_ /25,/26,/27,/27,/28,/29, /30,/31 _ _7

00 16 */25,*/26,*/27,*/28,*/29,*/30,*/31 * 7

我已经将其放入crontab.xml(以 */1 * * * * * * *)

<group id="default">
   <job instance="Company\DeleteOldProducts\Cron\DeleteOldProducts" method="execute" name="delete_old_products">
    <schedule>00 16 */25,*/26,*/27,*/28,*/29,*/30,*/31 * 7</schedule>
   </job>
</group>

为没有生成Cron任务。

Magento 2是否接受此逗号分开的符号?

我环顾四周,在exception.log或system.log或debug.log中看不到任何错误。

有什么想法吗?

I'm trying to set up a cron job to run on last Sunday of each month at 4:00PM.

I came up with this:

https://crontab.guru/#00_16_/25,/26,/27,/28,/29,/30,/31__7

00 16 */25,*/26,*/27,*/28,*/29,*/30,*/31 * 7

I've put this into crontab.xml (which was running before with */1 * * * *)

<group id="default">
   <job instance="Company\DeleteOldProducts\Cron\DeleteOldProducts" method="execute" name="delete_old_products">
    <schedule>00 16 */25,*/26,*/27,*/28,*/29,*/30,*/31 * 7</schedule>
   </job>
</group>

This, for some reason does not generate the cron tasks.

Does Magento 2 accept this comma separated notation?

I've looked around and don't see any errors in exception.log or system.log or debug.log.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

纸伞微斜 2025-02-02 22:02:31

woops,我只需要等待更长的时间。看起来它接受了这份工作。

cron作业 - 使用了当前日期进行测试,这就是为什么5月6日

Woops, I just had to wait a bit longer. Looks like it accepted the job.

cron job created - used a current date for testing that's why its May 6

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文