I. File location
Position in general under/var/spool/cron/, if you are root, then there is a root file, recommended daily backup, to avoid accidental deletion caused crontab file loss;
Two. log file location
By default, the log executed in Crontab is written under/var/log, such as:
#ls/var/log/cron*
/var/log/cron/var/log/cron.1/var/log/cron.2/var/log/cron.3/var/log/cron.4
The crontab log is simpler and sends a message to the user when a crond fails to perform a task. It happened that one of our servers found that a task was not executing correctly, and that Crond sent the mail failed. By looking at Mail's log, you see a lack of disk space.
You can add your own logs to the tasks in each crontab to help you find the reason for execution failure.
0 6 * * *//root/script/ss.sh >>/root/for_crontab/mylog.log 2>&1
The error output and standard output are exported to the MyLog.log.
If Crontab does not succeed, detect if the crontab service is started,
/etc/init.d/crond status
/etc/init.d/crond restart
Cron is the system daemon, location:
/etc/init.d/crond
Parameters:
Start
Stop
Restart
Reload
Wait a minute