[Linux]使用crontab管理排程工作

建立cron job:

crontab -e

按”I”進入編輯模式 語法:

[Minute] [Hour] [Day_of_the_Month] [Month_of_the_Year] [Day_of_the_Week] [command]

Minute (0-59)

Hour (0-23)

Day_of_the_Month (1-31)

Month_of_the_Year (1-12)

Day_of_the_Week (0-7, 0,7都是星期日)

如:每天14:15運行java程式abc.jar (path: /home/user/abc.jar)

15 14 * * * java -jar /home/user/abc.jar

編輯完成後,按”ESC”結束編輯模式, 輸入”:wq”儲存並退出(與vim用法一樣)