1AT(1) General Commands Manual AT(1)
2
3
4
6 at, batch, atq, atrm - queue, examine, or delete jobs for later execu‐
7 tion
8
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 at [-V] -l [-o timeformat] [job ...]
14 atq [-V] [-q queue] [-o timeformat] [job ...]
15 at [-rd] job [...]
16 atrm [-V] job [...]
17 batch
18 at -b
19
21 at and batch read commands from standard input or a specified file
22 which are to be executed at a later time, using /bin/sh.
23
24 at executes commands at a specified time.
25
26 atq lists the user's pending jobs, unless the user is the supe‐
27 ruser; in that case, everybody's jobs are listed. The format
28 of the output lines (one for each job) is: Job number, date,
29 hour, queue, and username.
30
31 atrm deletes jobs, identified by their job number.
32
33 batch executes commands when system load levels permit; in other
34 words, when the load average drops below 0.8, or the value
35 specified in the invocation of atd.
36
37 At allows fairly complex time specifications, extending the POSIX.2
38 standard. It accepts times of the form HH:MM to run a job at a spe‐
39 cific time of day. (If that time is already past, the next day is as‐
40 sumed.) You may also specify midnight, noon, or teatime (4pm) and you
41 can have a time-of-day suffixed with AM or PM for running in the morn‐
42 ing or the evening. You can also say what day the job will be run, by
43 giving a date in the form month-name day with an optional year, or giv‐
44 ing a date of the form MMDD[CC]YY, MM/DD/[CC]YY, DD.MM.[CC]YY or
45 [CC]YY-MM-DD. The specification of a date must follow the specifica‐
46 tion of the time of day. You can also give times like now + count
47 time-units, where the time-units can be minutes, hours, days, or weeks
48 and you can tell at to run the job today by suffixing the time with to‐
49 day and to run the job tomorrow by suffixing the time with tomorrow.
50
51 For example, to run a job at 4pm three days from now, you would do at
52 4pm + 3 days, to run a job at 10:00am on July 31, you would do at 10am
53 Jul 31 and to run a job at 1am tomorrow, you would do at 1am tomorrow.
54
55 If you specify a job to absolutely run at a specific time and date in
56 the past, the job will run as soon as possible. For example, if it is
57 8pm and you do a at 6pm today, it will run more likely at 8:05pm.
58
59 The definition of the time specification can be found in
60 /usr/share/doc/at/timespec.
61
62 For both at and batch, commands are read from standard input or the
63 file specified with the -f option and executed. The working directory,
64 the environment (except for the variables BASH_VERSINFO, DISPLAY, EUID,
65 GROUPS, SHELLOPTS, TERM, UID, and _) and the umask are retained from
66 the time of invocation.
67
68 As at is currently implemented as a setuid program, other environment
69 variables (e.g., LD_LIBRARY_PATH or LD_PRELOAD) are also not exported.
70 This may change in the future. As a workaround, set these variables
71 explicitly in your job.
72
73 An at - or batch - command invoked from a su(1) shell will retain the
74 current userid. The user will be mailed standard error and standard
75 output from his commands, if any. Mail will be sent using the command
76 /usr/sbin/sendmail. If at is executed from a su(1) shell, the owner of
77 the login shell will receive the mail.
78
79 The superuser may use these commands in any case. For other users,
80 permission to use at is determined by the files /etc/at.allow and
81 /etc/at.deny. See at.allow(5) for details.
82
84 -V prints the version number to standard error and exit success‐
85 fully.
86
87 -q queue
88 uses the specified queue. A queue designation consists of a
89 single letter; valid queue designations range from a to z and A
90 to Z. The a queue is the default for at and the b queue for
91 batch. Queues with higher letters run with increased niceness.
92 The special queue "=" is reserved for jobs which are currently
93 running.
94
95 If a job is submitted to a queue designated with an uppercase
96 letter, the job is treated as if it were submitted to batch at
97 the time of the job. Once the time is reached, the batch pro‐
98 cessing rules with respect to load average apply. If atq is
99 given a specific queue, it will only show jobs pending in that
100 queue.
101
102 -m Send mail to the user when the job has completed even if there
103 was no output.
104
105 -M Never send mail to the user.
106
107 -u username
108 Sends mail to username rather than the current user.
109
110 -f file Reads the job from file rather than standard input.
111
112 -t time run the job at time, given in the format [[CC]YY]MMDDhhmm[.ss]
113
114 -l Is an alias for atq.
115
116 -r Is an alias for atrm.
117
118 -d Is an alias for atrm.
119
120 -b is an alias for batch.
121
122 -v Shows the time the job will be executed before reading the job.
123
124 Times displayed will be in the format "Thu Feb 20 14:50:00 1997".
125
126 -c cats the jobs listed on the command line to standard output.
127
128 -o fmt strftime-like time format used for the job list
129
131 /var/spool/at
132 /var/spool/at/spool
133 /proc/loadavg
134 /var/run/utmp
135 /etc/at.allow
136 /etc/at.deny
137
139 at.allow(5), at.deny(5), atd(8), cron(1), nice(1), sh(1), umask(2).
140
142 The correct operation of batch for Linux depends on the presence of a
143 proc- type directory mounted on /proc.
144
145 If the file /var/run/utmp is not available or corrupted, or if the user
146 is not logged on at the time at is invoked, the mail is sent to the
147 userid found in the environment variable LOGNAME. If that is undefined
148 or empty, the current userid is assumed.
149
150 At and batch as presently implemented are not suitable when users are
151 competing for resources. If this is the case for your site, you might
152 want to consider another batch system, such as nqs.
153
155 At was mostly written by Thomas Koenig.
156
157
158
159 2009-11-14 AT(1)