1AT(1)                       General Commands Manual                      AT(1)
2
3
4

NAME

6       at,  batch, atq, atrm - queue, examine, or delete jobs for later execu‐
7       tion
8

SYNOPSIS

10       at [-V] [-q queue] [-f file] [-u username] [-mMlv] timespec ...
11       at [-V] [-q queue] [-f file] [-u username] [-mMkv] [-t time]
12       at -c job [...]
13       atq [-V] [-q queue]
14       at [-rd] job [...]
15       atrm [-V] job [...]
16       batch
17       at -b
18

DESCRIPTION

20       at and batch read commands from standard  input  or  a  specified  file
21       which are to be executed at a later time, using /bin/sh.
22
23       at      executes commands at a specified time.
24
25       atq     lists  the  user's  pending  jobs, unless the user is the supe‐
26               ruser; in that case, everybody's jobs are listed.   The  format
27               of  the  output  lines (one for each job) is: Job number, date,
28               hour, queue, and username.
29
30       atrm    deletes jobs, identified by their job number.
31
32       batch   executes commands when system  load  levels  permit;  in  other
33               words,  when  the  load  average  drops below 0.8, or the value
34               specified in the invocation of atd.
35
36       At allows fairly complex time  specifications,  extending  the  POSIX.2
37       standard.   It  accepts  times of the form HH:MM to run a job at a spe‐
38       cific time of day.  (If that time is already past, the next day is  as‐
39       sumed.)   You may also specify midnight, noon, or teatime (4pm) and you
40       can have a time-of-day suffixed with AM or PM for running in the  morn‐
41       ing  or the evening.  You can also say what day the job will be run, by
42       giving a date in the form month-name day with an optional year, or giv‐
43       ing  a  date  of  the  form  MMDD[CC]YY,  MM/DD/[CC]YY, DD.MM.[CC]YY or
44       [CC]YY-MM-DD.  The specification of a date must follow  the  specifica‐
45       tion  of  the  time  of  day.  You can also give times like now + count
46       time-units, where the time-units can be minutes, hours, days, or  weeks
47       and you can tell at to run the job today by suffixing the time with to‐
48       day and to run the job tomorrow by suffixing the time with tomorrow.
49
50       For example, to run a job at 4pm three days from now, you would  do  at
51       4pm  + 3 days, to run a job at 10:00am on July 31, you would do at 10am
52       Jul 31 and to run a job at 1am tomorrow, you would do at 1am tomorrow.
53
54       If you specify a job to absolutely run at a specific time and  date  in
55       the  past, the job will run as soon as possible.  For example, if it is
56       8pm and you do a at 6pm today, it will run more likely at 8:05pm.
57
58       The  definition  of  the   time   specification   can   be   found   in
59       /usr/share/doc/at/timespec.
60
61       For  both  at  and  batch, commands are read from standard input or the
62       file specified with the -f option and executed.  The working directory,
63       the environment (except for the variables BASH_VERSINFO, DISPLAY, EUID,
64       GROUPS, SHELLOPTS, TERM, UID, and _) and the umask  are  retained  from
65       the time of invocation.
66
67       As  at  is currently implemented as a setuid program, other environment
68       variables (e.g., LD_LIBRARY_PATH or LD_PRELOAD) are also not  exported.
69       This  may  change  in the future.  As a workaround, set these variables
70       explicitly in your job.
71
72       An at - or batch - command invoked from a su(1) shell will  retain  the
73       current  userid.   The  user will be mailed standard error and standard
74       output from his commands, if any.  Mail will be sent using the  command
75       /usr/sbin/sendmail.  If at is executed from a su(1) shell, the owner of
76       the login shell will receive the mail.
77
78       The superuser may use these commands in any  case.   For  other  users,
79       permission  to  use  at  is  determined  by the files /etc/at.allow and
80       /etc/at.deny.  See at.allow(5) for details.
81

OPTIONS

83       -V      prints the version number to standard error and  exit  success‐
84               fully.
85
86       -q queue
87               uses  the  specified  queue.  A queue designation consists of a
88               single letter; valid queue designations range from a to z and A
89               to  Z.   The  a queue is the default for at and the b queue for
90               batch.  Queues with higher letters run with increased niceness.
91               The  special queue "=" is reserved for jobs which are currently
92               running.
93
94               If a job is submitted to a queue designated with  an  uppercase
95               letter,  the job is treated as if it were submitted to batch at
96               the time of the job.  Once the time is reached, the batch  pro‐
97               cessing  rules  with  respect to load average apply.  If atq is
98               given a specific queue, it will only show jobs pending in  that
99               queue.
100
101       -m      Send  mail to the user when the job has completed even if there
102               was no output.
103
104       -M      Never send mail to the user.
105
106       -u username
107               Sends mail to username rather than the current user.
108
109       -f file Reads the job from file rather than standard input.
110
111       -t time run the job at time, given in the format [[CC]YY]MMDDhhmm[.ss]
112
113       -l      Is an alias for atq.
114
115       -r      Is an alias for atrm.
116
117       -d      Is an alias for atrm.
118
119       -b      is an alias for batch.
120
121       -v      Shows the time the job will be executed before reading the job.
122
123       Times displayed will be in the format "Thu Feb 20 14:50:00 1997".
124
125       -c     cats the jobs listed on the command line to standard output.
126

FILES

128       /var/spool/at
129       /var/spool/at/spool
130       /proc/loadavg
131       /var/run/utmp
132       /etc/at.allow
133       /etc/at.deny
134

SEE ALSO

136       at.allow(5), at.deny(5), atd(8), cron(1), nice(1), sh(1), umask(2).
137

BUGS

139       The correct operation of batch for Linux depends on the presence  of  a
140       proc- type directory mounted on /proc.
141
142       If the file /var/run/utmp is not available or corrupted, or if the user
143       is not logged on at the time at is invoked, the mail  is  sent  to  the
144       userid found in the environment variable LOGNAME.  If that is undefined
145       or empty, the current userid is assumed.
146
147       At and batch as presently implemented are not suitable when  users  are
148       competing  for resources.  If this is the case for your site, you might
149       want to consider another batch system, such as nqs.
150

AUTHOR

152       At was mostly written by Thomas Koenig.
153
154
155
156                                  2009-11-14                             AT(1)
Impressum