Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ at(1) — Interactive 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cron(1M)

kill(1)

mail(1)

nice(1)

ps(1)

sh(1)

sort(1)



          AT(1)                INTERACTIVE UNIX System                AT(1)



          NAME
               at, batch - execute commands at a later time

          SYNOPSIS
               at time [ date ] [  + increment ]
               at -r job ...
               at -l [  job ... ]

               batch

          DESCRIPTION
               The at and batch commands read commands from standard input
               to be executed at a later time.  at allows you to specify
               when the commands should be executed, while jobs queued with
               batch will execute when system load level permits.  at may
               be used with the following options:

               -r   Removes jobs previously scheduled with at.

               -l   Reports all jobs scheduled for the invoking user.

               Standard output and standard error output are mailed to the
               user unless they are redirected elsewhere.  The shell
               environment variables, current directory, umask, and ulimit
               are retained when the commands are executed.  Open file
               descriptors, traps, and priority are lost.

               Users are permitted to use at if their name appears in the
               file /usr/lib/cron/at.allow.  If that file does not exist,
               the file /usr/lib/cron/at.deny is checked to determine if
               the user should be denied access to at.  If neither file
               exists, only root is allowed to submit a job.  If at.deny is
               empty, global usage is permitted.  The allow/deny files con-
               sist of one user name per line.  These files can only be
               modified by the super-user.

               The time may be specified as 1, 2, or 4 digits.  One- and
               two-digit numbers are taken to be hours, four digits to be
               hours and minutes.  The time may alternately be specified as
               two numbers separated by a colon, meaning hour:minute.  A
               suffix am or pm may be appended; otherwise a 24-hour clock
               time is understood.  The suffix zulu may be used to indicate
               GMT.  The special names noon, midnight, now, and next are
               also recognized.

               An optional date may be specified as either a month name
               followed by a day number (and possibly year number preceded
               by an optional comma) or a day of the week (fully spelled or
               abbreviated to three characters).  Two special ``days'',
               today and tomorrow are recognized.  If no date is given,
               today is assumed if the given hour is greater than the
               current hour and tomorrow is assumed if it is less.  If the
               given month is less than the current month (and no year is


          Rev. Base System                                           Page 1





          AT(1)                INTERACTIVE UNIX System                AT(1)



               given), next year is assumed.

               The optional increment is simply a number suffixed by one of
               the following:  minutes, hours, days, weeks, months, or
               years.  (The singular form is also accepted.)

               Thus legitimate commands include:

                    at 0815am Jan 24
                    at 8:15am Jan 24
                    at now + 1 day
                    at 5 pm Friday

               at and batch write the job number and schedule time to stan-
               dard error.

               The at -r command removes jobs previously scheduled by at or
               batch.  The job number is the number given to you previously
               by the at or batch command.  You can also get job numbers by
               typing at -l.  You can remove only your own jobs unless you
               are the super-user.

          EXAMPLES
               The at and batch commands read from standard input the com-
               mands to be executed at a later time.  sh(1) provides a dif-
               ferent way of specifying standard input.  Within your com-
               mands, it may be useful to redirect standard output.

               This sequence can be used at a terminal:

                         batch
                         sort filename >outfile
                         <control-D> (hold down 'control' and depress 'D')

               This sequence, which demonstrates redirecting standard error
               to a pipe, is useful in a shell procedure (the sequence of
               output redirection specifications is significant):

                         batch <<!
                         sort filename 2>&1 >outfile | mail loginid
                         !

               To have a job reschedule itself, invoke at from within the
               shell procedure by including code similar to the following
               within the shell file:

                         echo "sh shellfile" | at 1900 thursday next week

          FILES
               /usr/lib/cron             main cron directory
               /usr/lib/cron/at.allow    list of allowed users
               /usr/lib/cron/at.deny     list of denied users
               /usr/lib/cron/queue       scheduling information


          Rev. Base System                                           Page 2





          AT(1)                INTERACTIVE UNIX System                AT(1)



               /usr/spool/cron/atjobs    spool area

          SEE ALSO
               cron(1M), kill(1), mail(1), nice(1), ps(1), sh(1), sort(1).

          DIAGNOSTICS
               Complains about various syntax errors and times out of
               range.















































          Rev. Base System                                           Page 3



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026