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 表示每一秒执行一次