(echo "0 0 * * * /script/clean_file.sh >>/dev/null 2>&1" ; crontab -l )| crontab
直接写入到crontab ,不需要crontab -e。
可用于shell批量写入。
本文介绍了一种不使用crontab编辑器,直接通过Shell命令将任务写入crontab的方法,适用于批量操作场景。
(echo "0 0 * * * /script/clean_file.sh >>/dev/null 2>&1" ; crontab -l )| crontab
直接写入到crontab ,不需要crontab -e。
可用于shell批量写入。
9384
2058
1070

被折叠的 条评论
为什么被折叠?
