UnixPedia : HPUX / LINUX / SOLARIS: HPUX : CRON AND CRONTAB

Sunday, March 16, 2014

HPUX : CRON AND CRONTAB





1. Important Files          

/var/adm/cron - Main Cron Directory
/var/adm/cron.allow - List of allowed users
/var/adm/cron.deny - List of denied users
/var/adm/cron/log - Accounting log file for cron
/var/spool/cron/crontabs - Directory that keep the actual cron files, the files are each named after the user who owns  the crontab.

2. Commands

A./usr/bin/crontab –l - List the entries in the current users crontab

B./usr/bin/crontab –e - Use the default editor to edit the crontab for the current user
This is the way the crontab should be altered, it checks for errors in format, and I if errors are found, it will not save the current crontab.  It also forces a reread by by the cron daemon.  It is normally not recommended to manually edit the /var/spool/cron/crontabs

C. /usr/bin/crontab –r - Remove the crontab for the current user

3. File Entries
A. The entries in the crontab must be listed in the following order:
    
Minute  hour  monthday  month  weekday  command


No comments:

Post a Comment