Since Mac OS X runs on top of Darwin, which is based on FreeBSD, we have a plethora of utilities available to us to help us automate our Macs. If you saw the hint about disabling the root password for sudo, then the following hints should make your life just a little bit easier (if you use fink, especially). Note that you may need the BSD subsystem packages installed in order to use this hint. I'm not sure, since I already have those packages installed.
You may or may not be familiar with cron, a daemon which allows you to schedule repetitive tasks to run throughout the day. However, there are two additional commands, not widely used, which can really make your life just a little bit easier. They are, at and batch. at and batch are really the same commands, but do different things depending on how they're called.
at allows you to schedule tasks, or an application, to execute at a specific date and time in the future. Unlike cron, which will run the application every n minutes, hours, days, weeks, etc., at will only run a command once. I use it all the time for reminders, like:
% echo "mail -s 'REMINDER: Feed the dog' myname@myemail.com" | at 18:30This will send me an email at 6:30pm to remind me to feed my dog. You can do a man at to see its manual and learn additional things you can do.
% batch... which will show nothing but a cursor. batch is waiting for me to type whatever commands I want it to do. Now, all I need to enter is:
% sudo fink -y update-all ^DThe ^D at the end is a Control+D, and is important to tell batch that you're done entering the commands.
% sudo pico /etc/crontabRemove the hash-mark (#) from the line which reads:
#*/5 * * * * root /usr/libexec/atrunSo it should now read:
*/5 * * * * root /usr/libexec/atrunThen exit and save your changes. That's it!
Mac OS X Hints
http://hints.macworld.com/article.php?story=20030122065553454