AT(1) AT(1) NAME at - execute commands at a later time SYNOPSIS at [ -c ] [ -s ] [ -m ] time [ day ] [ file ] DESCRIPTION _A_t spools away a copy of the named _f_i_l_e to be used as input to _s_h(1) or _c_s_h(1). If the -c flag (for _(_c_s_h(1))) or the -s flag (for _(_s_h(1))) is specified, then that shell will be used to execute the job; if no shell is specified, the current environment shell is used. If no file name is specified, _a_t prompts for commands from standard input until a ^D is typed. If the -m flag is specified, mail will be sent to the user after the job has been run. If errors occur during execution of the job, then a copy of the error diagnostics will be sent to the user. If no errors occur, then a short message is sent informing the user that no errors occurred. The format of the spool file is as follows: A four line header that includes the owner of the job, the name of the job, the shell used to run the job, and whether mail will be set after the job is executed. The header is followed by a _c_d command to the current directory and a _u_m_a_s_k command to set the modes on any files created by the job. Then _a_t copies all relevant environment variables to the spool file. When the script is run, it uses the user and group ID of the creator of the spool file. The _t_i_m_e is 1 to 4 digits, with an optional following ‘A’, ‘P’, ‘N’ or ‘M’ for AM, PM, noon or midnight. One and two digit numbers are taken to be hours, three and four digits to be hours and minutes. If no let‐ ters follow the digits, a 24 hour clock time is understood. The optional _d_a_y is either (1) a month name followed by a day number, or (2) a day of the week; if the word ‘week’ follows, invocation is moved seven days further off. Names of months and days may be recog‐ nizably truncated. Examples of legitimate commands are at 8am jan 24 at -c -m 1530 fr week at -s -m 1200n week _A_t programs are executed by periodic execution of the command /usr/lib/atrun from _c_r_o_n(8). The granularity of _a_t depends upon the how often atrun is executed. Error output is lost unless redirected or the _-_m flag is requested, in which case a copy of the errors is sent to the user via _m_a_i_l(1). FILES /usr/spool/at spooling area /usr/spool/at/yy.ddd.hhhh.* job file /usr/spool/at/past directory where jobs are executed from /usr/spool/at/lasttimedone last time atrun was run /usr/lib/atrun executor (run by cron(8)) SEE ALSO atq(1), atrm(1), calendar(1), sleep(1), cron(8) DIAGNOSTICS Complains about various syntax errors and times out of range. BUGS Due to the granularity of the execution of _/_u_s_r_/_l_i_b_/_a_t_r_u_n_, there may be bugs in scheduling things almost exactly 24 hours into the future. If the system crashes, mail is not sent to the user informing them that the job was not completed. Sometimes old spool files are not removed from the directory /usr/spool/at/past. This is usually due to a system crash, and requires that they be removed by hand. 4th Berkeley Distribution March 20, 1986 AT(1)