Cron - 每30分钟安排一次工作,从整整一小时开始

时间:2011-06-20 10:34:07

标签: cron crontab schedule

我可以安排以cron格式的工作,以便每天从早上6:30到晚上11:30每隔30分钟运行一次吗?怎么样?

2 个答案:

答案 0 :(得分:3)

我认为您需要2行才能达到您的需求:

30 6-11 * * * /path/to/your/command
0 7-11 * * * /path/to/your/command

答案 1 :(得分:0)

除了Alvin的回答,我建议将此行插入您的crontab:

*/30 6-11 * * * /path/to/your/command