laravel schedule task to run every 10 days of a mo

2019-08-14 03:13发布

I have a task which I need to execute for the first 10 days of every month

something like below:

$schedule->command('log:test')->cron('* * 1-10 * *');

seems cron() is not getting executed... though everyMinute() is working fine... How can I get this to work?

1条回答
手持菜刀,她持情操
2楼-- · 2019-08-14 03:43

You have to fill the hour and minutes on the cron. Try this one if you want it get executed at the start of the day.

$schedule->command('log:test')->cron('0 0 1-10 * *');
查看更多
登录 后发表回答