Nag ignores interrupts, quits and terminates. To get rid of it, you can log off or use ``kill -9.''
The .nag file has the format:
[ status ] day time interval command
status
is either
(1) '#', marking a comment line
(2) ':', turning off execution of commands for the event.
day
is one of
(1) A date such as mm/dd/yy, or reasonable alternatives.
(2) `*' meaning every day.
(3) A day of the week.
Day names may be recognizably abbreviated.
time is a standard time specification, like ``12:05'' or ``3AM''
interval is a colon separated list of signed integer offsets from the event time the command will be executed. Negative values are before the event, 0 at the event, and positive values later.
command is a string up to a newline that will be executed by system(3) on your behalf at the specified interval until you shut it up with okok.
Some shell variables are set for use by the command:
pretime
is set to the -interval.
posttime
is set to the interval.
now
is set to an hh:mm string of the present time, in 24 hour format.
then
is set to an hh:mm string of the event time.
okok shuts up the the nagging. It opens the terminal and prompts with the command(s) nearing their times, like rm -i. Answering `y' silences further executions of the command. It does this by editing the .nag file, which is noticed by any running nag processes the next time they wake up.
When a silenced event is past it's last possible occurrance, nag re-enables it by writing the .nag file. This makes `*' reminders work the next day.
8/8/88 2PM -60:-30:-15:0 writebig "$pretime to Client call at $then"
Mon 3PM -60:-30:-15:0 hey "Status report due in $pretime minutes"
Wed 3:30PM -30:-15:-5:0 echo "Committee at $then in $pretime minutes"
* 13:00 -45:-30:0 writebig "Lunch in $pretime minutes"
* 7PM -5:-4:-3:-2:-1:0 echo "GO HOME!!! It's $now"
* 10:30 -10:-5:0 echo "Donut truck in $pretime minutes"
Probably won't work with `stty nostop' set.
Intervals will be approximate because of sleep granularity and scheduling contention.
There is no locking of the .nag file. This could be trouble if a nag and an okok decide to write at the same time.