Magento Cron无效表达 [英] Magento invalid cron expression
问题描述
我在Magento中安装的一个扩展名中有一个计划为cron的表达式0 0 4 1/1 * ? *
.从我收集到的信息来看,它应该每天凌晨4点运行.
One of the extensions I have installed in Magento has a cron scheduled with the expression 0 0 4 1/1 * ? *
. From what I've gathered means it should run every day at 4am.
当Magento cron运行时,我收到一条错误报告:Invalid cron expression: 0 0 4 1/1 * ? *
.我还没有找到有关Magento Cron的有效格式的任何信息.他们应该只有5个字段吗?
When the Magento cron runs I get an error report saying: Invalid cron expression: 0 0 4 1/1 * ? *
. I haven't been able to find any information on the valid format for Magento crons. Should they only have 5 fields?
推荐答案
默认情况下,Magento使用 CronTrigger 格式.
By default Magento uses SimpleTrigger format (the one with 5 fields), however your cron here is in CronTrigger format.
我不是cron方面的专家,但我认为您的cron正在设定每天的时间表,以便在凌晨4点运行(请查看 SimpleTrigger格式重新设置其样式,为:
I'm not an expert in cron but I think your cron is setting a daily schedule to run at 4 AM (check it out here); Just try to restyle it in the SimpleTrigger format which would be:
0 4 * * *
这篇关于Magento Cron无效表达的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!