其实说白了很简单,就是新建一个文件 。然后把计算任务 写进去。执行完了或者有修改的地方就删除它。然后再crontab 执行下而已
1.添加:echo "1 * * * * /home/test" >> /user/crontabfile
2.删除:sed -i '/test/d' /user/crontabfile
3.然后 crontab /user/crontabfile 就行了.
sed -i '/test/d' xxxxfile,检查是否添加或删除成功。