I've already stated my allegiance to FCron, but after using it for quite some while and writing an article or two about it already (see Publications subpage), I think it's time I shared my fcrontabs.Since FCron is such a nice and vertisable command scheduler, I can depend that everything's going to get done even though my laptop is not up 24/7.fcrontab -e systab lets me edit my system fcrontab (note: systab ≠ root's fcrontab):# All FCron notifications are e-mailed to normal userMAILTO=hook# Updates 'slocate' in 'man' every day.%daily,nice(7),random,mail(no) * 10-14 makewhatis -u%daily,nice(7),random,mail(no) * 16-18 updatedb# Once a month (as soon as possible) my Portage tree is updated and the results e-mailed to my normal user's account.%monthly,nice(7)mail * 16-23 * eix-sync; emerge -DNuvp world# Once a month (on a random day in the second half of it) some general cleaning of the Portage tree; again e-mail of results.%midmonthly,nice(7),random,mail * 16-23 * eclean-dist --destructive --nocolor; eclean-pkg --destructive --nocolor; eix-test-obsolete detailedAnd here's my normal user's everyday stuff, accessible by fcrontab -e:# Twice a week the weather report gets printed automatically and an e-mail notifies me when I can take it from the printer or whether there's been a problem%weekly,mail * 06-23 sleep 500; wget http://www.yr.no/place/Slovenia/Ljubljana/Ljubljana/varsel.pdf -O /tmp/vreme.pdf && lpr /tmp/vreme.pdf && echo "Weather report printed." || echo "ERROR: Weather report *not* printed!" ; rm /tmp/vreme.pdf* %midweekly,mail * 06-23 sleep 500; wget http://www.yr.no/place/Slovenia/Ljubljana/Ljubljana/varsel.pdf -O /tmp/vreme.pdf && lpr /tmp/vreme.pdf && echo "Vremenska napoved je stiskana." || echo "NAPAKA: Vremenska napoved *ni* stiskana!" ; rm /tmp/vreme.pdf* # Using curl magic to automatically send updates to Status.net; I don't need e-mail notification of that ;)%nightly,mail(no) * * curl https://identi.ca/api/statuses/update.xml -u johndearheart: -d status='GNU John Dearheart → !discworld' %daily,mail(no) * * curl https://identi.ca/api/statuses/update.xml -u dwtrivia: -d status="`fortune discworld pqf -n 128 -s`"' → !discworld'Note 1: I prefer to use the %*LY commands to define cronjobs, because they fit my needs the most. FCron itself uses all sorts of ways how to define the time when a cronjob should be executed — from strict date+time (like in "normal" Crons) to intervals and even defined by uptime.Note 2: Of course, in the last two (f)cronjobs the passwords were censured ;)I hope this whet your appetite and you'll be anxious to try it and find your own way of how to make your life easier with FCron :] hook out >> doing "schoolwork" for my potential new legal counselling job More
2011-09-01