- crontab新加项:
echo "cmd" >> /var/spool/cron/root
例如:
echo "0 1 * * * cd /my_path;./my_script.sh > /dev/null 2>&1" >> /var/spool/cron/root
echo "cmd" >> /var/spool/cron/root
例如:
echo "0 1 * * * cd /my_path;./my_script.sh > /dev/null 2>&1" >> /var/spool/cron/root