[RndTbl] How to modify file times?

John Lange john at johnlange.ca
Fri Jun 13 12:00:28 CDT 2008


I love SUSE but I can't stand the way it implements cron.

Instead of using the usual /etc/crontab file to schedule cron.daily,
weekly etc, it creates files in /var/spool/cron/lastrun and uses the
file dates to schedule it's next run.

And it's completely arbitrary as to when things run. If you create
something in cron.weekly, it will execute it immediately and then
continue to execute it at that same time every week.

That doesn't sound so bad until you realize it uses the change
timestamp, not the modify or access timestamp.

And I'll give you one guess which timestamp you can't manually override
with touch? You guessed it, it's the change timestamp.

So if you want to change your scripts so that they run next Sunday at
4am, you have to change your system clock back to last Sunday and
"touch" the files.

I'm really hoping someone has a better solution than this...

-- 
John Lange
www.johnlange.ca




More information about the Roundtable mailing list