Any Simulated Time Services?
blinux.list at thechases.com
Sat Oct 18 04:02:36 UTC 2008
There seem to be two issues...one of syncing your system clock to
a global time-standard and one for notifying you of the time.
For the first issue of syncing up your clock, the ntpd program
keeps your computer clock from drifting.
For the second issue, most distros have the "at" command which
I've found to be accurate to within about a second on my system.
You can do something like
echo "/usr/bin/play /path/to/ding.wav" | at 21:15
to queue up the playing of ding.wav at 9:15:00pm. The "at"
command takes a fairly flexible date/time specification, and you
can easily choose your player & wave-file. You can use the "atq"
("at queue") and "atrm" ("at remove") commands to view and delete
queued jobs. I often use this as a simple alarm-clock,
triggering my "redalert.wav" klaxon sound to remind myself.
Remember to use the full path to the executable and .wav file
because when they're run, they may not be run in the same
environment as when you queued them up.
The "at" command isn't limited to just playing wave files...you
can look busy:
bash$ at 21:45
at> mail boss at example.com -s "Working late" < /tmp/late.txt
or schedule a large transfer for late at night:
echo "wget http://example.com/bigfile.zip" | at 2:00am tomorrow
or any other sort of deferred behavior you want.
As usual, the man-pages are a font of additional information.
More information about the Blinux-list