添加定时任务(先删除,然后再添加)
crontab -l | grep -v "your.sh" | crontab -
(crontab -l; echo "* * * * * sh "`pwd`"/your.sh") | crontab -
添加定时任务(先删除,然后再添加)
crontab -l | grep -v "your.sh" | crontab -
(crontab -l; echo "* * * * * sh "`pwd`"/your.sh") | crontab -
转载于:https://my.oschina.net/u/1473861/blog/2998929