EJK's Desktop's self-maintenence scripts
As I've been writing about on the frontpage quite a bit, I'm writing scripts that automate any small tasks that come up and keep certain numbers accurate. They are run by the Cron daemon at intervals that depend on the task. This page lists all of them from most-frequently-running to least-frequently-running. It doesn't include things that keep the permissions in the HTML dir correct should I ever forget something, or other non-website actions. These updating scripts all queue on the presence of anchor tags to know when/where to act. Searching through the HTML source to my pages will reveal where the tags are, they all have name="something to do with sed" in them. Without further ado, the scripts:
- sitestats.sh: Regenerates the stats.txt file with the latest information every 30 minutes.
index_size_update.sh: Keeps a reference to the size of the pictures in my photo galleries from 12/27 accurate. Despite the name, it now refers to updates2005.html. Runs daily just after midnight.
photo1_count_update.sh: Keeps a reference to the latest photo gallery in photo1.html correct. Runs daily just after midnight.
yearly_update_move.sh: The least-frequently-running script, it moves all the previous year's updates to an updates[YEAR].html file.
There will be more and more of these as time goes on, and I come across more and more new needs. Most of them arise as I'm doing something tedious in vi, like cutting out last year's updates. Although it is certainly possible for me to do the tasks these scripts perform, why should I? The computer can do them a thousand times faster, and it won't forget when to do them either.