Name

at [options] time_specification — at

Synopsis

/usr/bin stdin stdout - file -- opt --help --version

The at command runs a shell command once at a specified time:

$ at 7am next sunday
at> echo Remember to go shopping | Mail smith
at> lpr $HOME/shopping-list
at> ^D
<EOT>
job 559 at 2003-09-14 21:30

The time specifications understood by at are enormously flexible. In general, you can specify:

  • A time followed by a date (not a date followed by a time)

  • Only a date (assumes the current clock time)

  • Only a time (assumes the very next occurrence, whether today or tomorrow)

  • A special word like now, midnight, or teatime (16:00)

  • Any of the above followed by an offset, like “+ 3 days”

Dates are acceptable in many forms: december 25 2003, 25 december 2003, december 25, 25 december, 12/25/2003, 25.12.2003, 20031225, today, thursday, next thursday, next month, next year, and more. Month names can be abbreviated to three letters (jan, feb, mar, …). Times are also flexible: 8pm, 8 pm, 8:00pm, 8:00 pm, 20:00, and 2000 are equivalent. Offsets are a plus or minus sign followed by whitespace and an amount of time: + 3 seconds, + 2 weeks, - 1 hour, and so on.[19]

If you don’t specify a part of the date or time, at copies the missing information from the system date and time. So “next year” means one year from right now, “thursday” means the upcoming Thursday at the current clock time, “december 25” means the next upcoming December 25, and “4:30pm” means the very next occurrence of 4:30 p.m. in the future.

Your ...

Get Linux Pocket Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.