特定时间的Crontab oneliner

特定时间的Crontab oneliner,cron,Cron,我需要每天在10、12、16和20小时运行作业。 我知道我可以创建4个cron作业,如下所示: 0 10 * * * /path/to/execute/file 0 12 * * * /path/to/execute/file 0 16 * * * /path/to/execute/file 0 20 * * * /path/to/execute/file 我很好奇,可以在单个cron任务中安排此任务吗?可以: 010,12,16,20***/path/to/execute/file 下面是一

我需要每天在10、12、16和20小时运行作业。 我知道我可以创建4个cron作业,如下所示:

0 10 * * * /path/to/execute/file
0 12 * * * /path/to/execute/file
0 16 * * * /path/to/execute/file
0 20 * * * /path/to/execute/file
我很好奇,可以在单个cron任务中安排此任务吗?

可以:

010,12,16,20***/path/to/execute/file

下面是一个快速教程,可以更好地使用它:

010,12,16,20***/path/to/execute/file

这里有一个快速教程,可以更好地使用