- crontab -e 进行编辑,选择3使用vim模式进行编辑
- 如果刚开始选择错误了,可以使用select-editor进行重新选择
- 编辑完成后重新启动cron服务
service cron restart
- 定时任务示例
* * * * * bash /usr/local/syncvideos.sh > /data/rsync/syncvideos.log
service cron restart
* * * * * bash /usr/local/syncvideos.sh > /data/rsync/syncvideos.log