目标:每分钟将hello world字符串写入文件
实现:
设置定时:vi /etc/crontab
增加:*/1 * * * * root echo "hello world." >> /hello.txt (注意root一定要添加,否则start失败)
启动定时:/bin/systemctl start crond
启动后查看状态:/bin/systemctl status crond
关闭定时:/bin/systemctl stop crond
重启定时:/bin.systemctl restart crond