Manage jobs for later execution

at    [-V] [-q Q] [-f file] [-mldbv] time -t time_arg
batch [-V] [-q Q] [-f file] [-mv] [time]

at -c job [job…]
atq [-V] [-q queue]
atrm [-V] job [job...]

at and batch read commands from standard input or a specified file to be executed at a later time .
at executes commands at a specified time.
batch executes commands when system load average drops below 0.8, or the value specified in the invocation of atrun.
atq displays the user's pending jobs. For the superuser all jobs are listed in the format:
Job number, date, hour, job class.
atrm remove jobs, identified by their job number.

Time specifications

runs a job no sooner than that time. If already past, the next day is used.

A date may follow the time.

For example,

  • to run a job at 4pm three days from now, use 4pm + 3 days
  • to run a job at 10:00am on July 31, use 10am Jul 31
  • to run a job at 1am tomorrow, use 1am tomorrow.
  • The definition of the time specification can be found in /usr/share/doc/at-3.1.8/ timespec.

    The working directory, the environment (except for the variables TERM, DISPLAY and _) and the umask are retained from the time of invocation.
    A job invoked from a su shell retainas the current userid.
    The user will be mailed standard error and standard output using /usr/sbin/sendmail.
    If at is executed from a su shell, the owner of the login shell will receive the mail.

    For other users

    If /etc/at.allow exists, only usernames in it are allowed to use at.

    If /etc/at.allow does not exist,
        /etc/at.deny is checked, every username not mentioned in it

    If neither exists, only the superuser is allowed use of at.

    If /etc/at.denys is empty every user is allowed use these commands, default .
    -q queue uses the specified queue, a single letter [a-zA-Z], = for running jobs. Defaults: a for at and b for batch.
    Queues with higher letters run with increased niceness.

    A job is submitted to a queue with an uppercase letter is treated as if it had been submitted to batch at that time.
    For atq, only show jobs pending in that queue are shown.

    -m mail is send when the job completes, even if there was no output.
    -f file Reads the job from file rather than standard input.
    -l at -l alias for atq.
    -d at -d alias for atrm.
    -v Shows the time the job will be executed. in the format
    "1997-02-20 14:50" unless the environment variable POSIXLY_CORRECT is set; then, it will be
    "Thu Feb 20 14:50:00 1997".
    -c cats the jobs listed on the command line to standard output.
    -t time_arg the job is to be run at the time specified in the same format as specified for the touch(1) ([[CC]YY]MMDDhhmm).
    -V prints the version number to standard error.


    SHELL setting, at the time of at invocation, will be used to execute the commands. If unset the login shell will be used.
    The environment variables at time of invocation are used when the commands are run,
    Only the super-user's jobs can use variables that alter the behaviour of the loader such as LD_LIBRARY_PATH


        /var/spool/at /var/spool/at/spool
           /etc/at.allow /etc/at.deny
    cron, nice,bash, umask, atd

    Made true HTML and terse by Dennis German