3

我可以以 cron 格式安排作业,使其每天从早上 6:30 到 11:30 每 30 分钟运行一次吗?如何?

4

2 回答 2

3

我认为你需要 2 行来实现你所需要的:

30 6-11 * * * /path/to/your/command
0 7-11 * * * /path/to/your/command
于 2011-06-20T10:41:17.080 回答
0

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

*/30 6-11 * * * /path/to/your/command
于 2011-06-20T11:56:18.313 回答