Tuesday, May 25, 2010

Obivously, folks, I'm not a great schmoozer and publicist for myself. SOME of that is going to change - It's a necessary business skill.

Highlights of my absence:

1/ Currently laid off, between jobs, etc. Getting in Better Shape, getting allthe 'hanging over my head things I need to do someday' done.

2/ Some insights into using cron.
A/ On Ubuntu, the cron scripts for individual users are stored in a different place from where all the web articles said they were. Ubuntu does this often, but often better than other distributions, IMHO.

The location is: /var/spool/cron/crontabs/$SYSTEM_USER_NAME

B/ For something to happen at a repeating schedule, use */num. I saw this listed as '0/num' in several places, which is different. THAT starts at the 0 value of the time measure (minute/hour/day/month/year) and then every 'num' units past that. '*/num' starts at the NEXT evenly divisible by NUM unit. Examples:

EVERY MINUTE ----------------------------------
# m h dom mon dow command
0/1 * * * * echo "every single minute" >> $HOME/cron.log

Will create (if necessary) append (if file exists) the phrase 'every single minute' from the first time it is called by the cron daemon.

EVERY MINUTE AFTER XX:XX:00
# m h dom mon dow command
0/1 * * * * echo "every minute after the top of the next hour and then forever" >> $HOME/cron.log

Will create (if necessary) append (if file exists) the phrase 'every minute after the next top of the next hour and then forever' by the cron daemon.