*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> at (1)              



NAME    [Toc]    [Back]

     at, batch - queue, examine or delete jobs for  later  execution

SYNOPSIS    [Toc]    [Back]

     at [-blmr] [-f file] [-q queue] -t time_arg
     at [-blmr] [-f file] [-q queue] timespec
     at -c job [job ...]
     batch [-m] [-f file] [-q queue] [timespec]

DESCRIPTION    [Toc]    [Back]

     at  and  batch read commands from standard input or a specified file which
     are to be executed at a later time, via the user's shell  as
specified by
     the  SHELL  environment  variable.  If SHELL is not set, the
shell in the
     user's password database entry is used instead.  If all else
fails, sh(1)
     will be used.

     The related programs are as follows:

     at      Executes commands at a specified time.

     batch    Executes  commands  when system load levels permit.
In other
             words, when the load average drops below 1.5, or the
value specified
 in the invocation of cron(8).

     The options are as follows:

     -b      An alias for batch.

     -c       Prints the jobs listed on the command line to standard output.

     -f file
             Reads the job from file rather than standard  input.

     -l       Lists  the  user's pending jobs, unless the user is
the superuser.
             In that case, all users' jobs are listed.

     -m      Send mail to the user when the  job  has  completed,
even if there
             was no output.

     -q queue
             Uses  the specified queue.  A queue designation consists of a single
 letter.  Valid queue designations range  from  a
to z and A to
             Z.   The  c  queue  is  the default for at and the E
queue for batch.
             Queues with higher letters run with increased  niceness.  If a job
             is submitted to a queue designated with an uppercase
letter, it
             is treated as if it had been submitted to  batch  at
that time.  If
             the  user  specified the -l option and at is given a
             queue, only jobs  pending  in  that  queue  will  be

     -r      Remove the specified job(s) from the at queue.

     -t time_arg
             Specify  the  job time using the format specified by
touch(1).  The
             argument should be in the form [[CC]YY]MMDDhhmm[.SS]
where each
             pair of letters represents the following:

                   CC       The first two digits of the year (the
                   YY      The second two digits of the year.
                   MM      The month of the year, from 1 to 12.
                   DD      the day of the month, from 1 to 31.
                   hh      The hour of the day, from 0 to 23.
                   mm      The minute of the hour, from 0 to  59.
                   SS       The  second  of the minute, from 0 to

             If the CC and YY letter pairs are not specified, the
values default
 to the current year.  If the SS letter pair is
not specified,
 the value defaults to 0.

     -v      When used in conjunction with the -l  option,  shows
completed but
             not yet deleted jobs in the queue.

     at  allows  some moderately complex timespec specifications.
It accepts
     times of the form HHMM or HH:MM to run a job at  a  specific
time of day.
     (If  that  time  is  already past, the next day is assumed.)
You may also
     specify midnight, noon, or teatime (4pm) and you can have  a
     suffixed with ``AM'' or ``PM'' for running in the morning or
the evening.
     You can also say what day the job will be run, by  giving  a
date in the
     form  month-name day with an optional year, or giving a date
of the form

     The year may be given as two or four digits.  If the year is
given as two
     digits, it is taken to occur as soon as possible in the  future, which may
     be  in  the  next century -- unless it's last year, in which
case it's considered
 to be a typo.

     The specification of a date must follow the specification of
the time of
     day.    You  can  also  give  times  like  [`now']  +  count
time-units, where the
     time-units can be minutes, hours, days, or weeks and you can
tell at to
     run  the  job  today by suffixing the time with today and to
run the job tomorrow
 by suffixing the time with tomorrow.

     For example, to run a job at 4pm three days  from  now,  you
would do at 4pm
     +  3 days.  To run a job at 10:00am on July 31, you would do
at 10am Jul
     31.  To run a job at 1am  tomorrow,  you  would  do  at  1am

     The  at  utility  also  supports  the  time  format  used by
touch(1) (see the -t

     For both at and batch, commands are read from standard input
(or the file
     specified with the -f option) and executed.  The working directory, the
     environment (except for the variables  TERM,  TERMCAP,  DISPLAY, and _), and
     the  umask  are retained from the time of invocation.  An at
or batch command
 invoked from a su(1) shell will retain the current user
ID.  The user
  will  be  mailed standard error and standard output from
his commands,
     if any.  Mail will be sent using sendmail(8).  If at is executed from a
     su(1)  shell,  the owner of the login shell will receive the

     For non-root users, permission to run at  is  determined  by
the files
     /var/cron/at.allow and /var/cron/at.deny.  Note: these files
must be
     readable by group crontab (if they exist).

     If the file /var/cron/at.allow exists, only  usernames  mentioned in it are
     allowed to use at.  If /var/cron/at.allow does not exist,
     /var/cron/at.deny  is checked.  Every username not mentioned
in it is then
     allowed to use at.  If neither exists, only the superuser is
allowed to
     run at.

     An  empty /var/cron/at.deny means that every user is allowed
use these
     commands.  This is the default configuration.

FILES    [Toc]    [Back]

     /var/cron/atjobs    directory containing job files
     /var/cron/at.allow  allow permission control
     /var/cron/at.deny   deny permission control

SEE ALSO    [Toc]    [Back]

     nice(1), sh(1), touch(1), umask(2), cron(8), sendmail(8)

AUTHORS    [Toc]    [Back]

     at was mostly written by  Thomas  Koenig  <ig25@rz.uni-karlsruhe.de>.  The
     time parsing routines are by
     David Parsons <orc@pell.chi.il.us>.

BUGS    [Toc]    [Back]

     at  and batch as presently implemented are not suitable when
users are
     competing for resources.  If this is the case for your site,
you might
     want to consider another batch system, such as nqs.

OpenBSD      3.6                           May      13,      2002
[ Back ]
 Similar pages
Name OS Title
miser_qinfo IRIX query information on miser queues, queue resource status, and list of jobs scheduled against a queue
atrun FreeBSD run jobs queued for later execution
atrun Linux run jobs queued for later execution
atd Linux run jobs queued for later execution
atq Tru64 Prints the queue of jobs waiting to be run
lprm OpenBSD remove jobs from the line printer spooling queue
lprm FreeBSD remove jobs from the line printer spooling queue
scsi_max_qdepth HP-UX maximum number of I/Os that target will queue up for execution
fg IRIX run jobs in the foreground
bg IRIX run jobs in the background
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service