You may also want to launch a command at a given day, but not regularly. For example, you want to be reminded of an appointment, today at 6pm. You run X, and you'd like to be notified at 5:30pm, for example, that you must go. at is what you want here:
$ at 5:30pm # You're now in front of the "at" prompt at> xmessage "Time to go now! Appointment at 6pm" # Type C-d to exit at> <EOT> $ |
You can specify the time in different manners:
now +<interval>: Means, well, now, plus an interval (optionally. No interval specified means just now). The syntax for the interval is <n> (minutes|hours|days|weeks|months). For example, you can specify now + 1 hour, now + 3 days and so on.
<time> <day>: Fully specify the date. The <time> parameter is mandatory. at is very liberal in what it accepts: you can for example type 0100, 04:20, 2am, 0530pm, 1800, or one of three special values: noon, teatime (4pm) or midnight. The <day> parameter is optional. You can specify it in different manners as well: 12/20/2001 for example, which stands for December 20th, 2001, or, the European way, 20.12.2001. You may omit the year, but then only the European notation is accepted: 20.12. You can also specify the month in full letters: Dec 20 or 20 Dec are both valid.
at also accepts different options:
-l: Prints the list of currently queued jobs; the first field is the job number. This is equivalent to the atq command.
-d <n>: Remove job number <n> from the queue. You can obtain job numbers from atq. This is equivalent to atrm <n>.
As usual, see the man 1 at manpage for more options.