Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ at(C) — Xenix 2.3.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cron(C)

kill(C)

mail(C)

nice(C)

ps(C)

sh(C)



     AT(C)                    XENIX System V                     AT(C)



     Name
          at, batch - Executes commands at a later time.

     Syntax
          at time [ date ] [ + increment ]

          at -r job ...

          at -l[ job ... ]

          at -q[ letter ] time [ date ] [ job ... ]

     Description
          at and batch read commands from the standard input to be
          executed at a later time.  at allows you to specify a time
          when the commands should be executed, while batch executes
          jobs when the system load level permits.

          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 priorities are lost.

          A user is permitted to use at if his 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 only the
          at.deny file exists, global usage is permitted.  The
          allow/deny files consist of one user name per line.

          The options are:

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

          date 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



     Page 1                                           (printed 8/7/87)





     AT(C)                    XENIX System V                     AT(C)



               is less than the current month (and no year is given),
               next year is assumed.

          increment
               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

          -r   Removes jobs previously scheduled by the at or
               batchcommand.  Unless you are the super-user, you can
               only remove your own jobs.

          -l   Lists all the jobs currently scheduled for the invoking
               user.

          -qletter
               Places the specified job in a queue denoted by letter,
               where letter is any letter from ``a'' to ``z'' (not
               uppercase).  The queue letter is appended to the job
               number.  The following letters have special
               significance:
                                   a   at queue
                                   b   batch queue
                                   c   cron queue

          at and batch write the job number and schedule time to
          standard error.  batch submits a batch job.  It is almost
          equivalent to ``at now,'' but with a difference: batch goes
          into a different queue; at now will respond with the error
          message too late.

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

          The following sequence can be used at a terminal:

               batch
               nroff filename > outfile
               <Ctrl-D> (press ``Ctrl'' and press ``D'')








     Page 2                                           (printed 8/7/87)





     AT(C)                    XENIX System V                     AT(C)



          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/lib/cron/queue      scheduling information

          /usr/spool/cron/atjobs   spool area

     See Also
          cron(C), kill(C), mail(C), nice(C), ps(C), sh(C)

     Diagnostics
          Complains about syntax errors and times out of range.























     Page 3                                           (printed 8/7/87)



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