Work Smarter not Harder - We have large data sets in my current project. Every year tons more data is loaded into the system. So we only keep the majority of data for 4 years. After...
Careful When Reverse Engineering
Now I don't know the crontab entry syntax by heart. When memorize that when you can look it up? At this point I also figured why look it up if you can reverse engineer it by looking at some entries. I saw some existing entries that run on Tuesdays. Then I saw some existing entries that run on Wednesdays. The first difference I noticed was that the Tuesday jobs started with a 0 on the crontab line, and the Wednesday jobs started with a 1.
I figured this was simple. Just change the first digit to a 1 and you move the job to Wednesdays. However I had a nagging feeling in my stomach. Why would they define Tuesday as 0? Shouldn't 0 represent the start of the week? That would make Sunday be represented by 0. Or if they were really weird, maybe Monday could be 0. But not Tuesday.
I decided to look up the cron docs. Oh snap. That first parameter is minute of the hour when the job is supposed to fire. Parameter number 5 on the line governs the day of the week when the job is kicked off. Good thing I did not rely too heavily on my weak reverse engineering skills. The moral of the story is to look stuff up unless it cannot be easily Googled.