Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > C

cron(1M)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

cron — timed-job execution daemon

SYNOPSIS

/usr/sbin/cron

DESCRIPTION

cron executes commands at specified dates and times. Regularly scheduled commands can be specified according to instructions placed in crontab files. Users can submit their own crontab files with a crontab command (see crontab(1)). Users can submit commands that are to be executed only once with an at or batch command.

Since cron never exits, it should be executed only once. This is best done by running cron from the initialization process with the startup script /sbin/init.d/cron (see init(1M)).

cron only establishes a schedule for crontab files and at or batch command files during process initialization and when it is notified by at, batch, or crontab that a file has been added, deleted, or modified.

When cron executes a job, the job's user and group IDs are set to those of the user who submitted the job.

Spring and Autumn Time Transitions

On the days of daylight savings (summer) time transition (in time zones and countries where daylight savings time applies), cron schedules commands differently from normal.

In the following description, an ambiguous time refers to an hour and minute that occurs twice in the same day because of a daylight savings time transition (usually on a day during the Autumn season). A nonexistent time refers to an hour and minute that does not occur because of a daylight savings time transition (usually on a day during the Spring season). DST-shift refers to the offset that is applied to standard time to result in daylight savings time. This is normally one hour, but can be any combination of hours and minutes up to 23 hours and 59 minutes (see tztab(4)).

When a command is specified to run at an ambiguous time, the command is executed only once at the first occurrence of the ambiguous time.

When a command is specified to run at a nonexistent time, the command is executed after the specified time by an amount of time equal to the DST-shift. When such an adjustment would conflict with another time specified to run the command, the command is run only once rather than running the command twice at the same time.

Commands that are scheduled to run during all hours (there is a * is in the hour field of the crontab entry) are scheduled without any adjustment.

EXTERNAL INFLUENCES

Environment Variables

LANG determines the language in which messages are displayed.

If LANG is not specified or is set to the empty string, it defaults to "C" (see lang(5)). If any internationalization variable contains an invalid setting, all internationalization variables default to "C" (see environ(5)).

DIAGNOSTICS

A history of all actions taken by cron is recorded in /var/adm/cron/log.

EXAMPLES

The following examples assume that the time zone is MST7MDT. In this time zone, the DST transition occurs one second before 2:00 a.m. and the DST-shift is 1 hour.

Consider the following entries in a crontab file:

# Minute Hour MonthDay Month Weekday Command # ---------------------------------------------------------- 0 01 * * * Job_1 0 02 * * * Job_2 0 03 * * * Job_3 0 04 * * * Job_4 0 * * * * Job_hourly 0 2,3,4 * * * Multiple_1 0 2,4 * * * Multiple_2

For the period of 1:00 a.m. to 4:00 a.m. on the days of DST transition, the results will be:

JobTimes Run in FallTimes Run in Spring
Job_101:00 MDT01:00 MST
Job_202:00 MDT03:00 MDT
Job_303:00 MST03:00 MDT
Job_404:00 MST04:00 MDT
Job_hourly01:00 MDT01:00 MST
02:00 MDT 
02:00 MST 
03:00 MST03:00 MDT
04:00 MST04:00 MDT
Multiple_102:00 MDT 
03:00 MST03:00 MDT
04:00 MST04:00 MDT
Multiple_202:00 MDT03:00 MDT
04:00 MST04:00 MDT

WARNINGS

In the Spring, when there is a nonexistent hour because of daylight savings time, a command that is scheduled to run multiple times during the nonexistent hour will only be run once. For example, a command scheduled to run at 2:00 and 2:30 a.m. in the MST7MDT time zone will only run at 3:00 a.m. The command that was scheduled at 2:30 a.m. will not be run at all, instead of running at 3:30 a.m.

DEPENDENCIES

HP Process Resource Manager

If the optional HP Process Resource Management (PRM) software is installed and configured, jobs are launched in the initial process resource group of the user that scheduled the job. The user's initial group is determined at the time the job is started, not when the job is scheduled. If the user's initial group is not defined, the job runs in the user default group (PRMID=1). See prmconfig(1) for a description of how to configure HP PRM, and prmconf(4) for a description of how the user's initial process resource group is determined.

AUTHOR

cron was developed by AT&T and HP.

FILES

/var/adm/cron

Main cron directory

/var/spool/cron/atjobs

Directory containing at and batch job files

/var/spool/cron/crontabs

Directory containing crontab files

/var/adm/cron/log

Accounting information

SEE ALSO

at(1), crontab(1), sh(1), init(1M), queuedefs(4), tztab(4).

HP Process Resource Manager: prmconfig(1), prmconf(4) in HP Process Resource Manager User's Guide.

STANDARDS CONFORMANCE

cron: SVID2, SVID3

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.