


      AT(1)                       (UNIX 5.2)                      AT(1)



      NAME
           at, batch - execute commands at a later time

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

           batch

      DESCRIPTION
           At and batch read commands from standard input and execute
           them 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 -r removes
           jobs previously scheduled with at. The -l option 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, umask, and ulimit are retained when
           the commands are executed.  Open file descriptors, traps,
           and priority are lost.  In order to retain the current
           directory, modifications must be made to the
           /usr/lib/cron/.proto file.  At uses this .proto file as a
           prototype to build the actual job being submitted.  It
           copies this file, substituting for special variables the
           appropriate run-time data.  The resulting file is then
           actually submitted to cron as a shell script.

           For instance, in the standard .proto file, the variable '$t'
           is expanded to the current time stamp when the at command is
           executed, and the '$<' tells at to copy the standard input
           to the spool file.

           To make at retain the current working directory, login as
           root and add the following line to /usr/lib/cron/.proto:

           cd $d

           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.  Global usage
           is permitted by creating an empty at.deny file and no
           at.allow file.  The allow/deny files consist of one user
           name per line.

           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



      Page 1                                          (73 A2 02MT REV1)






      AT(1)                       (UNIX 5.2)                      AT(1)



           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
           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.)




































      Page 2                                          (73 A2 02MT REV1)






      AT(1)                       (UNIX 5.2)                      AT(1)



           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
           standard error.

           Batch submits a batch job.  Batch is almost equivalent to
           ``at but it goes into a different queue, and ``at now'' will
           respond with the error message ``too late.''

           At -r 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 only remove your own jobs unless you are the
           super-user.

      EXAMPLES
           The at and batch commands read from standard input the
           commands to be executed at a later time.  Sh(1) provides
           different ways of specifying standard input.  Within your
           commands, it may be useful to redirect standard output.

           This sequence can be used at a terminal:
                     batch
                     nroff 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 <<!
                     nroff 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/spool/cron/atjobs - spool area

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



      Page 3                                          (73 A2 02MT REV1)






      AT(1)                       (UNIX 5.2)                      AT(1)



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




















































      Page 4                                          (73 A2 02MT REV1)



