1 atcrontab
先安裝at定時任務
yum install atim
at now +3 minutesyum
其餘一小時,一天,一年,內同,能夠搜,這裏就很少少。img
atq 查看定時任務tab
at -d num 刪除任務co
ctrl + d 退出工作
2 crontabab
在工做中更多的是crontab定時任務。和at 相比,at是執行完成後就刪除掉了,而crontab不會刪除。
安裝crontab
crontab -l查看定時任務
crontab -e 編輯定時任務
* * * * * commond
分 時 日 月 周
*/1 * * * * /commond 表示每一秒執行一次