]> git.saurik.com Git - apple/system_cmds.git/blob - at.tproj/at.1
system_cmds-336.tar.gz
[apple/system_cmds.git] / at.tproj / at.1
1 .\"
2 .\" Copyright (c) 1993 Christopher G. Demetriou
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\" 3. All advertising materials mentioning features or use of this software
14 .\" must display the following acknowledgement:
15 .\" This product includes software developed by Christopher G. Demetriou.
16 .\" 3. The name of the author may not be used to endorse or promote products
17 .\" derived from this software without specific prior written permission
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 .\"
30 .\" $Id: at.1,v 1.5 2005/02/18 00:22:38 lindak Exp $
31 .\"
32 .Dd December 5, 1993
33 .Dt "AT" 1
34 .Os NetBSD 0.9a
35 .Sh NAME
36 .Nm at, batch, atq, atrm
37 .Nd queue, examine, or delete jobs for later execution
38 .\"
39 .Sh SYOPSIS
40 .Nm at
41 .Op Fl q Ar queue
42 .Op Fl f Ar file
43 .Op Fl m
44 .Ar time
45 .Pp
46 .Nm atq
47 .Op Fl q Ar queue
48 .Op Fl v
49 .Pp
50 .Nm atrm
51 .Ar job
52 .Op Ar job ...
53 .Pp
54 .Nm batch
55 .Op Fl f Ar file
56 .Op Fl m
57 .Ar time
58 .Sh NOTE
59 .Nm at ,
60 .Nm batch ,
61 .Nm atq ,
62 .Nm atrm
63 are all disabled by default on Mac OS X.
64 Each of these commands depend on the execution of
65 .Xr atrun 8
66 which has been disabled due to power management concerns.
67 Those who would like to use these commands, must first (as root) re-enable
68 .Nm atrun
69 by running:
70 .Bd -literal
71 launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist
72 .Ed
73 .Sh DESCRIPTION
74 The
75 .Nm at
76 and
77 .Nm batch
78 utilities read commands from the standard input or a specified file
79 which are to be executed at a later time, using
80 .Xr sh 1 .
81 .Pp
82 The functions of the commands are as follows:
83 .Bl -tag -width indent
84 .It Nm at
85 Executes commands at a specified time.
86 .It Nm atq
87 Lists the user's pending jobs, unless the user is
88 the superuser. In that case, everybody's jobs are
89 listed.
90 .It Nm atrm
91 Deletes jobs.
92 .It Nm batch
93 Executes commands when system load levels drop below a user-specifed threshold.
94 The load threshold for batch jobs is specifed
95 as an argument when executing
96 .Xr atrun 8 .
97 .El
98 .Pp
99 For both
100 .Nm at
101 and
102 .Nm batch ,
103 the working directory, environment (except for the variables
104 .Nm TERM ,
105 .Nm TERMCAP ,
106 .Nm DISPLAY ,
107 and
108 .Nm _ )
109 and the umask are retained from the time of invocation. The user
110 will be mailed the standard output and standard error from
111 his commands if any output is generated. If
112 .Nm at
113 is executed from a
114 .Xr su 1
115 shell, the owner of the login shell will receive the mail.
116 .Sh OPTIONS
117 .Bl -tag -width indent
118 The available options are as follows:
119 .It Fl q Ar queue
120 Use the specified queue. A queue designation consists
121 of a single letter; valid queue designation range from
122 .Ar a
123 to
124 .Ar l .
125 The
126 .Ar a
127 queue is the default, and
128 .Ar b
129 is the batch queue. Queues with higher letters run with
130 increased niceness. If
131 .Nm atq
132 is given a specific queue, it will only show jobs pending
133 in that queue.
134 .It Fl m
135 Send mail to the user when the job has completed, even if
136 there was no output.
137 .It Fl f Ar file
138 Reads the job from
139 .Ar file
140 rather than the standard input.
141 .It Fl v
142 Shows completed but not yet deleted jobs in the queue.
143 .El
144 .Sh TIME SPECIFICATION
145 .Nm At
146 allows some moderately complex time specifications.
147 It accepts times of the form
148 .Ar HHMM
149 or
150 .Ar HH:MM
151 to run a job at a specific time of day. If
152 that time is already passed, the next day is assumed.
153 You may also specify
154 .Nm midnight ,
155 .Nm noon ,
156 or
157 .Nm teatime
158 (4PM) and you can give a time of day suffixed with
159 .Nm AM
160 or
161 .Nm PM
162 for running in the morning or the evening. You can
163 also specify the date on which the job will be run
164 by giving a date in the form
165 .Ar month-name day
166 with an optional
167 .Ar year ,
168 or giving a date of the form
169 .Ar MMDDYY ,
170 .Ar MM/DD/YY
171 or
172 .Ar DD.MM.YY .
173 You can also give times like
174 .Nm now +
175 .Ar count time-units ,
176 where the time units can be
177 .Nm minutes, hours, days,
178 or
179 .Nm weeks
180 You can suffix the time with
181 .Nm today
182 to run the job today, or
183 .Nm tomorrow
184 to run the job tomorrow.
185 .Pp
186 For example, to run a job at 4PM three days from now, you
187 would specify a time of
188 .Nm 4PM + 3 days .
189 To run a job at 10:00AM on on July 31, you would specify
190 a time of
191 .Nm 10AM Jul 31 .
192 Finally, to run a job at 1AM tomorrow, you would specify
193 a time of
194 .Nm 1AM tomorrow .
195 .Sh FILES
196 .Bl -tag -width /var/at/lockfile -compact
197 .It Pa /var/at/jobs
198 Directory containing job files
199 .It Pa /var/at/spool
200 Directory containing output spool files
201 .It Pa /var/at/lockfile
202 Job-creation lock file.
203 .It Pa /var/run/utmp
204 .El
205 .Sh SEE ALSO
206 .Xr launchctl 1 ,
207 .Xr launchd 8 ,
208 .Xr nice 1 ,
209 .Xr sh 1 ,
210 .Xr compat 5 ,
211 .Xr atrun 8
212 .Sh AUTHOR
213 .Bl -tag
214 Thomas Koenig, ig25@rz.uni-karlsruhe.de
215 .El
216 .Sh BUGS
217 Traditional access control to
218 .Nm at
219 and
220 .Nm batch
221 via the files
222 .Pa /var/at/at.allow
223 and
224 .Pa /var/at/at.deny
225 is not implemented.
226 .Pp
227 If the file
228 .Pa /var/run/utmp
229 is not available or corrupted, or if the user is not
230 logged in at the time
231 .Nm at
232 is invoked, the mail is sent to the userid found in the
233 environment variable
234 .Nm LOGNAME .
235 If that is undefined or empty, the current userid is assumed.