crond定时任务需要注意权限设置
chmod 0777 /home/www.comqr.com/cron/ 脚本文件夹
chmod 0600 /etc/crontab
SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root # For details see man 4 crontabs # Example of job definition: # .---------------- minute (0 - 59) # | .------------- hour (0 - 23) # | | .---------- day of month (1 - 31) # | | | .------- month (1 - 12) OR jan,feb,mar,apr ... # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat # | | | | | # * * * * * user-name command to be executed */1 * * * * root /home/www.comqr.com/cron/x1.sh >/dev/null 2>&1 */5 * * * * root /home/www.comqr.com/cron/x5.sh >/dev/null 2>&1 */10 * * * * root /home/www.comqr.com/cron/x10.sh >/dev/null 2>&1 */60 * * * * root /home/www.comqr.com/cron/x60.sh >/dev/null 2>&1
service crond restart
service crond stop
service crond start
浙公网安备 33010602011771号