Saturday, July 17, 2010
crontab: Are my Cron Jobs Running Fine?
How can I tell if my cronjobs are running ok since they don't produce any output?
Check the following file:
/var/cron/log : (cron history information)
/var/cron/olog : (moves log file to /var/cron/olog if log file exceeds system ulimit)
The file looks something like this:
Check the following file:
/var/cron/log : (cron history information)
/var/cron/olog : (moves log file to /var/cron/olog if log file exceeds system ulimit)
The file looks something like this:
! *** cron started *** pid = 260 Tue Jun 4 00:30:56 2002
> CMD: [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1
> root 429 c Tue Jun 4 02:01:00 2002
< root 429 c Tue Jun 4 02:01:00 2002 rc=1
> CMD: /usr/sbin/logadm
> root 440 c Tue Jun 4 03:10:00 2002
< root 440 c Tue Jun 4 03:10:00 2002
> CMD: [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean
> root 452 c Tue Jun 4 03:30:00 2002
< root 452 c Tue Jun 4 03:30:00 2002
> CMD: [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1
> root 429 c Tue Jun 4 02:01:00 2002
< root 429 c Tue Jun 4 02:01:00 2002 rc=1
> CMD: /usr/sbin/logadm
> root 440 c Tue Jun 4 03:10:00 2002
< root 440 c Tue Jun 4 03:10:00 2002
> CMD: [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean
> root 452 c Tue Jun 4 03:30:00 2002
< root 452 c Tue Jun 4 03:30:00 2002
It provided the following:
- The CMD is the command that was run
- Next entry is the time the job started
- Next is the time the job finished
- The rc is the return code from the job
No comments:
Post a Comment