当前位置: 首页 > news >正文

crontab定时运行

crontab [ -u user ] { -l | -r | -e }

查看用户root的定时任务列表

crontab -u root -l

删除用户root的定时任务文件

crontab -u root -r

编辑用户root的定时任务

crontab -u root -e

运行时间公式 + 运行程序

*/1 * * * * ~/email.sh
~
~
~
~
~
- /etc/crontabs.22780 1/1 100%

编辑好定时任务后 任务会自动定时运行