crontab filename #导入任务列表,导入会把之前的清除
[[email protected]]# crontab -l | grep -v "#" > file.txt [[email protected]]# echo "* * * * * echo ok" >> file.txt [[email protected]]# crontab file.txt [[email protected]]# cat file.txt MAILTO="" */30 * * * * sh /usr/shell/updatetime.sh [[email protected]]# crontab file.txt [[email protected]]# crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (file.txt installed on Thu Aug 21 11:00:57 2014) # (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $) MAILTO="" */30 * * * * sh /usr/shell/updatetime.sh [[email protected]]# /etc/init.d/crond restart
crontab 导入任务列表
时间: 2024-10-31 22:23:21