crb3's cron stuff |
|
|
This is stuff I've written which is designed to be driven by the cron demon.
gnitergniter is what you drop into a kid's account when you find that the kid has been getting up out of bed on a school night and sneaking onto the Linux machine to chat on IRC or play flash games. Started by cron at a set time, it sits there, killing everything in the process table that has the kid's username attached, until cron deletes its lockfile; then it goes away. Some distros have logon timezone controls, but this solution works on just about all of them. It knocks the kid off when he's already logged in with the screen turned off, too.
quakemapsA few years back when some folks on the Internet were saying that there were major seismic events ahead, I thought I'd see for myself. There were quake maps being presented on the Net by then, but they were static and only showed recent locations, with minimal history. My solution was to fetch those maps in and animate them, one animation per day. If things were coming to a head, there should be a rising overall recent-quakes count and a detectable correlation between events over time, both of which should be visible in an animation. Well, there weren't. The animated maps did show interesting stuff, though, the way the earth rattles around a little, adjusting pressures along known faults while settling back down, after a significant event. There weren't any obvious patterns, but the overall effect was reassuring.
The process is simple enough: fetch in a new GIF map every half hour to a datecoded filename, then (re)generate the day's animation using gifsicle, the only outside dependency and the real engine for this process. Once a day, after the last fetch of the day, either archive or delete the individual frames so they don't become part of the next day's animation. Both processes are cron-driven. If you're on stable enough geology that earthquakes don't interest you, pretty much the same process can be used to pull together longer-term radar sweep animations of a major stormfront's movement from the shorter animated loops on the weather sites.
|