Ants Alarm v2.4

Ants Alarm is an alarm tool designed to be used from cron, it is used to sound an alarm at the time that is set in the users crontab file. Actually, cron can display an alarm message to you if you use the following command in the crontab file:

        echo "some alarm message" > /dev/console 2>&1
but the alarm message will only be sent to the console terminal screens, and it won't be sent to the X window terminal screens. So, I made the Alarm program which will detect & send the alarm message to every terminal on which the user is logged on.


Click here to download Ants Alarm.

1. Edit the 'prefix' & any other variables in the 'Configuration section' of '' file to suit your needs.
2. Copy the files '' & 'alarm.hlp' to the directory that is specified by the 'prefix' variable.
3. Optionally, you can also copy the file 'Bird.wav' to that same directory.


Ants Alarm v2.4 - a program to remind you of your appointments, it is intended to be used with cron.
Usage: [options] ["alarm message string"]
The options are:
-m, --message <"alarm message string">   also the alarm message string could be
                                         set without the '-m' or '--message'
-a, --audiofile <audio filename>         an audio filename, this could be
                                         either a WAV, MIDI, MP3 or RM file.
-b, --nobeep                             disable beeping.
-s, --snooze <snooze period>             the format of snooze period is : 


                                         's' is for seconds, 'm' is for minutes,
                                         'h' is for hours, 'd' is for days, if
                                         not set, the default is seconds.
                                         Snoozing is disabled by default.
-r, --repeat <repitition times>          sets the number of times for which the 
                                         alarm should be repeated. Setting the
                                         repitition times value to zero results 
                                         in the alarm repeating itself
                                         infinitely till the alarm is killed, 
                                         halted or stopped. Default value is 
                                         zero. [this option is used in 
                                         conjunction with the '--snooze' option]
-n, --alarm-name <alarm_name>            this should be a ONE WORD ONLY name !
-X                                       to enable alarming to X Windows [not 
                                         yet implemented].
-H, --halt                               to halt a snoozing alarm [the '-n'
                                         option SHOULD be used with this option]
-h, --help                               displays this help.


Here's an entry example in my crontab file:

50 6 * * * /usr/local/bin/ -s 5m -n univ_bus -m "Time to go... univ. bus"
when the time is 6:50 am, '' will start alarming me every 5 minutes displaying this message to me:
[ant1 on ~]$ Alarm [Sat Sep 4 6:50:09 1999]: Time to go... univ. bus
Alarm [Sat Sep 4 6:50:09 1999]: Time to go... univ. bus
Alarm [Sat Sep 4 6:50:09 1999]: Time to go... univ. bus
The message "Alarm [Sat Sep 4 6:50:09 1999]: Time to go... univ. bus" is repeated every 5 minutes. To stop this alarm I would issue the following command:
[ant1 on ~]$ alarm -H -n univ_bus


1. When 'cron' runs the alarm program, it sends you an email containing the program's output, u can disable this by writing the following in your alarm command line:

        alarm [options] [alarm message string] > /dev/null

2. alarm can be used without any arguments(options) at all.
3. ` alarm "some message" ' is equivalent to ` alarm -m "some message" '


1. Some characters in the alarm message should be written in a special way, for example: "!" should be given to the alarm program like this "\!", unfortunately, 'alarm' will also display it as "\!".

To do:

1. Make the '-H' (halt) option stop all the snoozing alarm processes if it were invoked without the '-n <alarm name>' option.
2. When snoozing, display in the alert message that the user is : '(snooze_period * repitition times) late'


Ahmed El-Mahmoudy
URL 1:
URL 2: (this site is available only when I'm online)

This program is distributed under the GNU General Public License, read the file COPYING file for details.

The code for this program has been written using VIM