at(1)

at(1)

be present. A ®eld having a value greater than 31 is treated as the year ®eld and the remaining two ®elds in the date string are treated as month and day ®elds. Otherwise, if a given date is ambiguous (such as 2/5 or 2/5/10), the D_T_FMT string (if de®ned in langinfo(5)) is used to resolve the ambiguity.

Two special days, today and tomorrow, are also recognized. If no date is given, today is assumed if the given time is greater than the current time; tomorrow is assumed if it is less.

If the given month is less than the current month (and no year is given), next year is assumed. Two-digit years in the range 69 to 99 are expanded to 1969 to 1999; in the range 00 to 68, to 2000 to 2068.

next timeunit + count timeunit

Delay the execution date and time by a speci®c number of time units after the base time speci®ed by time [date].

count A decimal number. next is equivalent to +1.

timeunit A time unit, one of the following: minutes, hours, days, weeks, months, or years, or their singular forms.

How Jobs Are Processed

When a job is accepted, at and batch print a message to standard error in the form:

job job-id at execution-date

where job-idis the job identi®er in the form jobnumber.queue, such as 756284400.a , and execution-dateis the date and time when the job will be released for execution.

If your login shell is not the POSIX shell (/usr/bin/sh ), the commands also print a warning message:

warning: commands will be executed using /usr/bin/sh

at jobs default to queue a. batch jobs always go in queue b. See the -qoption.

An at or batch job consists of a two-part script stored in /var/spool/cron/atjobs that can be executed by the POSIX shell.

The ®rst part sets up the environment to match the environment when the at or batch command was issued. This includes the current shell environment variables, current directory, umask, and ulimit (see ulimit(2), umask(1), and proto(4)). Open ®le descriptors, traps, and priority are lost.

The second part consists of the commands that you entered.

When cron dispatches the job, it starts a POSIX shell to execute the script.

The number of jobs executing from a queue at any time is controlled by parameters in the ®le /var/adm/cron/queuedefs (see queuedefs(4)).

Standard output and standard error from the job are mailed to the user unless they are redirected elsewhere within the job.

Scheduled jobs are immune to the SIGHUP hangup signal, and remain scheduled if the user logs off.

Users are permitted to use the at and batch commands if their user names appear in the ®le /usr/lib/cron/at.allow. If that ®le does not exist, users can use at and batch if their names do not appear in the ®le /usr/lib/cron/at.deny. If neither ®le exists, only superuser is allowed to submit jobs. If only at.deny exists but is empty, all users can use at and batch. The allow/deny ®les consist of one user name per line.

All users can list and remove their own jobs. Users with appropriate privileges can list and remove jobs other than their own.

EXTERNAL INFLUENCES

Environment Variables

LC_TIME determines the format and contents of date and time strings.

LC_MESSAGES determines the language in which messages are displayed.

a

HP-UX Release 11i: December 2000

− 3 −

Section 129