5 ways to drop yourself reminders/alarms in Linux
A lot of services on the web offer wake up calls, reminder calls, or just other services meant to drop you an e-mail or phone call at a specific time. You can do many of these things via a Linux box, and maybe save yourself some money in the process.
- Send yourself a one-time reminder e-mail about something.
- Pop up a one-time reminder on your computer about something.
- Alarm Clock with ‘at’
- Alarm Clock with ‘cron’
- Alarm Clock with KAlarm
You can do this via the handy ‘at’ command. For instance, if I wanted to shoot myself an e-mail after work reminding me to pick up my laundry from the dry cleaners, I could do the following:
echo "mail -s 'Get dry cleaning' me@myemailaddress.com < /dev/null" | at 17:45
I can also send this e-mail to my cell phone, giving me another reminder away from my computer. US AT&T users can send messages to their telephone number @txt.att.net and it will be received as an SMS message on the phone.
The ‘at’ command comes in handy again. If I want to remind myself to let my dogs in from the back yard, I can simply type:
echo "DISPLAY=$DISPLAY xmessage Let dogs in!" | at 18:15
At 6:15, a little message box will pop up telling me to let the dogs in.
You can also specify times for ‘at’ by using NOW + interval.
For instance, using
at "NOW + 30 minutes"
will give me an execution time of 30 minutes from now. I could use hours, days, or weeks to get whatever effect I wanted. In addition, an e-mail log of everything will be sent to my local e-mail account, detailing what went on.
If you need to wake up early one morning, or you want to wake up from a nap, you can use your computer as an alarm clock and play an MP3 for you to wake up to. This one is straightforward enough. You’ll need mpg321 installed to use this, and know the path to the mp3 file you want to play.
echo "mpg321 ~/Trivium/Rain.mp3" | at 5:30AM
You’ll have to execute pkill mpg321 in a terminal to make it shut up, though.
Now we’re going to do the same thing, but on every weekday of every month.
Execute crontab -e and then type in the following:
30 5 * * 1-5 mpg321 ~/Trivium/Rain.mp3 >/dev/null
Now, every weekday at 5:30, you’ll get that mp3 blasting out over your speakers. Obviously you’ll need to specify your own MP3 file. You’ll also need to execute pkill mpg321 to make this one shut up. Your spouse may not like this idea, but assure your spouse that it will make you wake up more easily.
You’ll need to install KAlarm for this one. KAlarm will let you run XWindows applications (or even command line apps) via a cron-like process. It can also send e-mails and pop up messages. Check out their documentation here.
You can schedule MP3s with XMMS and Totem much in the same way as you can mpg321.
xmms ~/Trivium/Rain.mp3
totem ~/Trivium/Rain.mp3
You can set up Kalarm to run these programs and blast out your music for a specified time. If you haven’t killed the application within that set time period, Kalarm can kill it for you. Which is handy when you’re not home and you have heavy metal blasting through your 7.1 Surround Sound speakers at 5:30 in the morning for your neighbors to hear. Eviction isn’t high on anybody’s priorities list.
Did I miss anything? Leave it in the comments section.
Until next time!
-LightningCrash

October 9th, 2007 at 9:38 am
I think you got them all:
http://www.pixelbeat.org/cmdline.html#dates
Here’s another:
(sleep 10; DISPLAY=$DISPLAY xmessage wake up)&