任务1: 每隔1分钟,运行一次 /home/sn/yeelink.sh文件 ,用于上传数据到www.yeelink.net
1. 先在当时目录里面创建一个cronfile文件
vim cronfile
输入如下内容:
1 * * * * /home/sn/yeelink.sh
2. 使用crontab 加载cronfile
crontab cronfile
3. 检查一下,任务是否加入了列表当中
crontab -l
输入内容如下:
root@sn-pc:/home/sn# crontab -l 1 * * * * /home/sn/yeelink.sh
好了,至此完成了任务了。
原文:http://www.cnblogs.com/sn-dnv-aps/p/4365761.html