Linux系统管理-系统定时任务

1 crond服务管理与访问控制

  启动crond服务

service crond restart

  设置crond为自启动

chkconfig crond on

  检查和设置系统的各种服务

chkconfig  --list  或  systemctl list-unit-files

 

2 crontab设置

crontab [选项]

  -e:  编辑crontab定时任务: * * * * * 任务

  -l:  查询crontab任务

  -r:  删除当前用户所有的crontab任务(一般用不到)

例如:* * * * * echo 123456 >> /tmp/test.txt   #每分钟往test.txt中填写一行123456

 

 

 

posted @ 2020-03-28 14:49  ziwuxian  阅读(190)  评论(0编辑  收藏  举报