dongzhen6554 2019-01-06 12:47
浏览 483

Laravel任务调度错误:位置处的CRON字段值10,40无效

I was trying to schedule a job to run on 10th and 40th minute of every hour. So wrote the expression as follows:

$schedule->job(new \App\Jobs\ExcuteJob())->cron('0 10,40 * * *');

And getting error:

Invalid CRON field value 10,40 at position 1 {"exception":"[object] (InvalidArgumentException(code: 0): Invalid CRON field value 10,40 at position 1 at /var/www/html/school-management-system/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php:154)

  • 写回答

1条回答 默认 最新

  • duanmianxue2687 2019-01-06 13:06
    关注

    There is a mistake in your command try this:

    $schedule->job(new \App\Jobs\ExcuteJob())->cron('*/10,*/40 */1 * * *');
    

    This command should call the cronjob every 10th and 40th minutes of an hour.

    This page may help you.

    评论

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记