That's a bad title, it really should be "stupid cron mistakes" or "when idiots set up cron jobs, tonight on Fox!" or maybe "I'm Polish, but really, I'm not blonde".
Last week I set up a cron job to email our VP of engineering with some information on the first of every month. I've done cron jobs hundreds, nah, thousands of times, how hard can this be? It wasn't.. really.. piece of cake..
* * 1 * * mail important_boss_person@tickets.com
No problem.. that is, until this morning as I get an email requesting the damn flood of emails stop. Thank god the first wasn't on a weekend..
--- Added later ---
I've been asked by the less-cron-literate to explain what in the world is funny about this. It's like this, see.. in the cron world, there are 5 basic ways to describe when a job should fire off.. They live on one line, in the form of numbers, separated by a space.
Let's pretend these things below are numbers not the friendly, descriptive words they realy are.
Minute Hour Day-of-Month Month Day-of-Week
That's the most simplistic view, there are some very complicated and confusing ways of using all this, but for the purposes of illustrating my blonded-ness (is that a word?) this will suffice. For a wildcard (at any possible-value for this column) you'd use, of course an asterisk (*). So say, if I want something to run on the 1st of every month, at a quarter after 3, i would do something like...
15 3 1 * * Run-little-cron-run
As opposed, to say, if I wanted something to run every minute of every hour on the first of the month.. then i would use, eh, you see it above.