|
|
1.1 root 1:
2:
3: at Command at
4:
5:
6:
7:
8: Execute commands at given time
9:
10: aatt [ -vv ] [ -cc _c_o_m_m_a_n_d ] _t_i_m_e [ [ _d_a_y ] wweeeekk ] [ _f_i_l_e ]
11: aatt [ -vv ] [ -cc _c_o_m_m_a_n_d ] _t_i_m_e _m_o_n_t_h _d_a_y [ _f_i_l_e ]
12:
13: at executes commands at a given time in the future.
14:
15: If the -c option is used, aatt executes the following command. If
16: file is named, at reads the commands from it. If neither is
17: given, at reads the standard input for commands.
18:
19: If time is a one-digit or two-digit number, aatt interprets it as
20: specifying an hour. If time is a three-digit or four-digit num-
21: ber, aatt interprets it as specifying an hour and minutes. If _t_i_m_e
22: is followed by aa, pp, nn, or mm, at assumes AAMM, PPMM, nnoooonn, or mmiidd-
23: nniigghhtt, respectively; otherwise, it assumes that time indicates a
24: 24-hour clock.
25:
26: For example, the command
27:
28:
29: at -c "time | msg henry" 1450
30:
31:
32: set the ttiimmee command to be executed at 2:50 PM, and pipe ttiimmee's
33: output to the mmssgg command, which will pass it to the terminal of
34: user hheennrryy. Note that argument to the -cc option had to be
35: enclosed in quotation marks because it contains spaces and
36: special characters; if this were not done, aatt would not be able
37: to tell when the argument ended, and so would generate an error
38: message. Also note that if you wish pass information to a user's
39: terminal with the aatt command, you must tell aatt to whom to send
40: the information. The command
41:
42:
43: at 250p commandfile
44:
45:
46: will set the file ccoommmmaannddffiillee to be read and executed at 2:50 PM.
47: Note that it is _n_o_t necessary to use the file's full path name.
48: Also, if the suffix pp were not appended to the time, the file
49: would be set to be read at 2:50 AM.
50:
51: The time set in aatt's command line is _n_o_t the exact time that the
52: command is executed. Rather, the daemon cron wakes up the file
53: /usr/lib/atrun periodically to see if any commands have been
54: scheduled commands to be executed at or before that time. The
55: frequency with which cron executes atrun determines the
56: ``granularity'' of at execution times; it may be changed by
57: editing the file /usr/lib/crontab. For example, the entry
58:
59:
60:
61:
62:
63:
64: COHERENT Lexicon Page 1
65:
66:
67:
68:
69: at Command at
70:
71:
72:
73: 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/lib/atrun
74:
75:
76: sets /uussrr/lliibb/aattrruunn to be executed every five minutes. Thus, the
77: aatt command that is set, for example, to 2:53 PM will actually be
78: executed at 2:55 PM. atrun executes specified commands when it
79: discovers that the given time is past; therefore, at commands are
80: executed even if the system is down at the specified time or if
81: the system's time is changed.
82:
83: The aatt command has two forms, as shown above. In the first form,
84: the option day names a day of the week (lower case, spelled out).
85: If week is specified, at interprets the given time and day as
86: meaning that time and day the following week. For example, the
87: command
88:
89:
90: at -c "time | msg henry" 1450 friday week
91:
92:
93: executes ttiimmee and sends its output to hheennrryy's terminal one week
94: from Friday at 2:50 PM.
95:
96: In the second form given above, month specifies a month name
97: (lower case, spelled out) and the number day specifies a day of
98: the month. For example, the command
99:
100:
101: at 1450 july 4 commandfile
102:
103:
104: set the file ccoommmmaannddffiillee to be read at 2:50 PM on July 4.
105:
106: If the -v flag is given, at prints the time when the commands
107: will be executed, giving you enough information to plan for the
108: execution of the command. For example, if it is now August 13,
109: 1990, at 2:30 PM, and you type the command
110:
111:
112: at -v -c "/usr/games/fortune | msg henry" 1435
113:
114:
115: aatt will reply:
116:
117:
118: Tue Aug 13 14:35:00
119:
120:
121: indicating that the command will be executed five minutes from
122: now. However, if you type
123:
124:
125:
126:
127:
128:
129:
130: COHERENT Lexicon Page 2
131:
132:
133:
134:
135: at Command at
136:
137:
138:
139: at -v -c "/usr/games/fortune | msg henry" 1435 august 10
140:
141:
142: aatt will reply
143:
144:
145: Sun Aug 10 14:35:00 1991
146:
147:
148: which indicates that on Sunday, August 10 of next year, at 2:35
149: PM, the COHERENT system will print a ffoorrttuunnee onto your terminal.
150:
151: Should you create such a long-distance aatt file by accident, you
152: can correct the error by simply deleting the file that encodes it
153: from the directory /uussrr/ssppooooll/aatt. The file will be named after
154: the time that it is set to execute, plus a unique two-character
155: suffix, should more than one command be scheduled to run at the
156: same time. For example, the file for the above command would be
157: named 99110088110011443355.aaaa.
158:
159: Finally, note that the current working directory, exported shell
160: variables, file creation mask, user id, and group id are restored
161: when the given command is executed.
162:
163: ***** Files *****
164:
165: /bbiinn/ppwwdd -- To find current directory
166: /uussrr/lliibb/aattrruunn -- Execute scheduled commands
167: /uussrr/ssppooooll/aatt -- Scheduled activity directory
168: /uussrr/ssppooooll/aatt/ _y_y_m_m_d_d_h_h_m_m._x_x -- Commands scheduled at given time
169:
170: ***** See Also *****
171:
172: at, commands, cron
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196: COHERENT Lexicon Page 3
197:
198:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.