2015-05-26 51 views
0

我需要在Linux中每隔20分鐘運行一次cron作業。最重要的是,它必須在第10,30和50分鐘。 我想我需要運行3 cron作業爲:Cron在特定的時間間隔工作

10 * * * * /path_to_script 
30 * * * * /path_to_script 
50 * * * * /path_to_script 

是否有可能滿足使用單一cron作業這一要求?

+0

不要忘記投票回答這個回答你的問題。 – tjeloep

回答

3
10,30,50 * * * * /path_to_script 

10/20 * * * * /path_to_script 

-1

聚集在一個睡眠(1200)時間分隔符的所有腳本

#script

#!/bin/bash 

./wayto/script1; 
sleep(1200); 
./wayto/script2; 
sleep(1200) 
./wayto/script3; 

,並在cron一個作業可以通過crontab -e

10 * * * * /bin/bash /way/to/script