Runs commands automatically.
The cron daemon runs shell commands at specified dates and times. The following event types are scheduled by the cron daemon:
The way these events are handled is specified by the /var/adm/cron/queuedefs file.
Regularly scheduled commands can be specified according to instructions contained in the crontab files. You can submit your crontab file with the crontab command. Use the at command to submit commands that are to be run only once. Because the cron daemon never exits, it should be run only once.
The cron daemon examines crontab files and at command files only when the cron daemon is initialized. When you make changes to the crontab files using the crontab command, a message indicating the change is sent to the cron daemon. This eliminates the overhead of checking for new or changed files at regularly scheduled intervals.
When the TZ environment variable is changed, either with the chtz command, a Web-based System Manager application, or through SMIT, the cron daemon must be restarted. This enables the cron daemon to use the correct time zone and summer time change information for the new TZ environment variable.
- If you have a job scheduled to run between 1:00 AM and 2:00 AM on the day your time zone changes from daylight saving time to standard time your job will run twice.
- If you have a job scheduled to run between 2:01 AM and 2:59 AM on the day your time zone changes from standard time to day light savings time your job will not run. You can change the time these jobs run, run them manually, or with until the following day to run them. The cron daemon does not need to be stopped. However, if changes are made to the TZ environment variable, kill the current cron daemon so that it automatically respawns and recognizes the new TZ setting.
The cron daemon creates a log of its activities in the /var/adm/cron/log file.
Auditing Events: If the
auditing subsystem has been properly configured and is enabled, the
cron daemon will generate the following audit record (event) every
time the command is executed:
|CRON_Start||Lists the name of each job, whether the job was initiated by an at or cron command, and the time the job started.|
|CRON_Finish||Lists the user's name, process ID of the job, and the time the processing was completed.|
See "Setting up Auditing" in AIX 5L Version 5.1 System Management Guide: Operating System and Devices for more details about how to properly select and group audit events, and how to configure audit event data collection.
|/var/adm/cron/FIFO||A named pipe that sends messages to the cron daemon when new jobs are submitted with the crontab or at commands.|
|/var/adm/cron||Specifies the main cron daemon directory.|
|/var/adm/cron/log||Specifies the accounting information for all the executed cron jobs with the information like the owner, pid, start time, command and the exit status of the cron job.|
|Specifies the cron daemon events file.|
|/var/spool/cron||Specifies the spool area.|
|/usr||Indicates directory kept open by the cron daemon.|
|/usr/bin||Indicates directory kept open by the cron daemon.|
|/usr/lib||Indicates directory kept open by the cron daemon.|
|/etc||Indicates directory kept open by the cron daemon.|
|/tmp||Indicates directory kept open by the cron daemon.|
The at command, auditpr command, batch command, crontab command, csh command, ksh command, rc command.
The sync subroutine.
The Auditing Overview in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices explains more about audits and audit events.
For information on installing the Web-based System Manager, see Chapter 2: Installation and System Requirements in AIX 5L Version 5.1 Web-based System Manager Administration Guide.