]> git.saurik.com Git - apple/system_cmds.git/blame - at.tproj/at.1
system_cmds-336.tar.gz
[apple/system_cmds.git] / at.tproj / at.1
CommitLineData
1815bff5
A
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.\"
2fc1e207 30.\" $Id: at.1,v 1.5 2005/02/18 00:22:38 lindak Exp $
1815bff5
A
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
20e66415
A
58.Sh NOTE
59.Nm at ,
60.Nm batch ,
61.Nm atq ,
62.Nm atrm
63are all disabled by default on Mac OS X.
64Each of these commands depend on the execution of
65.Xr atrun 8
66which has been disabled due to power management concerns.
2fc1e207
A
67Those who would like to use these commands, must first (as root) re-enable
68.Nm atrun
69by running:
20e66415 70.Bd -literal
2fc1e207 71launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist
20e66415 72.Ed
1815bff5
A
73.Sh DESCRIPTION
74The
75.Nm at
76and
77.Nm batch
78utilities read commands from the standard input or a specified file
79which are to be executed at a later time, using
80.Xr sh 1 .
81.Pp
82The functions of the commands are as follows:
83.Bl -tag -width indent
84.It Nm at
85Executes commands at a specified time.
86.It Nm atq
87Lists the user's pending jobs, unless the user is
88the superuser. In that case, everybody's jobs are
89listed.
90.It Nm atrm
91Deletes jobs.
92.It Nm batch
20e66415
A
93Executes commands when system load levels drop below a user-specifed threshold.
94The load threshold for batch jobs is specifed
95as an argument when executing
96.Xr atrun 8 .
1815bff5
A
97.El
98.Pp
99For both
100.Nm at
101and
102.Nm batch ,
103the working directory, environment (except for the variables
104.Nm TERM ,
105.Nm TERMCAP ,
106.Nm DISPLAY ,
107and
108.Nm _ )
109and the umask are retained from the time of invocation. The user
110will be mailed the standard output and standard error from
111his commands if any output is generated. If
112.Nm at
113is executed from a
114.Xr su 1
115shell, the owner of the login shell will receive the mail.
116.Sh OPTIONS
117.Bl -tag -width indent
118The available options are as follows:
119.It Fl q Ar queue
120Use the specified queue. A queue designation consists
121of a single letter; valid queue designation range from
122.Ar a
123to
124.Ar l .
125The
126.Ar a
127queue is the default, and
128.Ar b
129is the batch queue. Queues with higher letters run with
130increased niceness. If
131.Nm atq
132is given a specific queue, it will only show jobs pending
133in that queue.
134.It Fl m
135Send mail to the user when the job has completed, even if
136there was no output.
137.It Fl f Ar file
138Reads the job from
139.Ar file
140rather than the standard input.
141.It Fl v
142Shows completed but not yet deleted jobs in the queue.
20e66415 143.El
1815bff5
A
144.Sh TIME SPECIFICATION
145.Nm At
146allows some moderately complex time specifications.
147It accepts times of the form
148.Ar HHMM
149or
150.Ar HH:MM
151to run a job at a specific time of day. If
152that time is already passed, the next day is assumed.
153You may also specify
154.Nm midnight ,
155.Nm noon ,
156or
157.Nm teatime
158(4PM) and you can give a time of day suffixed with
159.Nm AM
160or
161.Nm PM
162for running in the morning or the evening. You can
163also specify the date on which the job will be run
164by giving a date in the form
165.Ar month-name day
166with an optional
167.Ar year ,
168or giving a date of the form
169.Ar MMDDYY ,
170.Ar MM/DD/YY
171or
172.Ar DD.MM.YY .
173You can also give times like
174.Nm now +
175.Ar count time-units ,
176where the time units can be
177.Nm minutes, hours, days,
178or
179.Nm weeks
180You can suffix the time with
181.Nm today
182to run the job today, or
183.Nm tomorrow
184to run the job tomorrow.
185.Pp
186For example, to run a job at 4PM three days from now, you
187would specify a time of
188.Nm 4PM + 3 days .
189To run a job at 10:00AM on on July 31, you would specify
190a time of
191.Nm 10AM Jul 31 .
192Finally, to run a job at 1AM tomorrow, you would specify
193a time of
194.Nm 1AM tomorrow .
195.Sh FILES
196.Bl -tag -width /var/at/lockfile -compact
197.It Pa /var/at/jobs
198Directory containing job files
199.It Pa /var/at/spool
200Directory containing output spool files
201.It Pa /var/at/lockfile
202Job-creation lock file.
203.It Pa /var/run/utmp
204.El
205.Sh SEE ALSO
2fc1e207
A
206.Xr launchctl 1 ,
207.Xr launchd 8 ,
1815bff5
A
208.Xr nice 1 ,
209.Xr sh 1 ,
2fc1e207 210.Xr compat 5 ,
1815bff5
A
211.Xr atrun 8
212.Sh AUTHOR
213.Bl -tag
214Thomas Koenig, ig25@rz.uni-karlsruhe.de
215.El
216.Sh BUGS
217Traditional access control to
218.Nm at
219and
220.Nm batch
221via the files
222.Pa /var/at/at.allow
223and
224.Pa /var/at/at.deny
225is not implemented.
226.Pp
227If the file
228.Pa /var/run/utmp
229is not available or corrupted, or if the user is not
230logged in at the time
231.Nm at
232is invoked, the mail is sent to the userid found in the
233environment variable
234.Nm LOGNAME .
235If that is undefined or empty, the current userid is assumed.