
Tuesday, 18th March 2008 at 12:39am
I love my soya burgers, but I don't like them burnt. More than once I've put them on the grill, came to check what's happening on MSN, and totally forgotten about them. Sensible people have egg timers for this type of thing, but we have Debian servers and should frown upon such out dated methods.
Instead, we can send an email to ourselves when we need to turn our burgers over.
We can do that using the at and mail commands. at lets us tell Debian to do something at a particular period of time. We want to have to turn our burgers over in eight minutes, so tell it that.
at now +8 minutes
For some reason, my server lags for a second, but then you go into the at program interface1. It's here we say what we want to do.
echo "Time to turn your burgers over!" | mail -s "Just a reminder!" shamess@gmail.com
This runs mail, where -s is the subject, and the to address goes at the end. Then, mail expects you to type the body of your message, so we just echo it here (more on pipes later). This sends me an email with "Just a reminder!" as the subject, and "Time to turn..." as the body.
There you go! No more burnt food! Be inventive with other reminders you could give for yourself.
1When you move away from the standard interface where your CLI all starts with your user@host:/etc$ into the interface where you have mysql: or at:, does that have a name?