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