[RndTbl] How to modify file times?

Gilles Detillieux grdetil at scrc.umanitoba.ca
Fri Jun 13 13:07:03 CDT 2008


There seems to be a tidy solution in example 22-2 here:

http://www.linuxtopia.org/online_books/suse_linux_guides/SLES10/suse_enterprise_linux_server_installation_admin/sec_suse_pakete.html

It just removes the relevant time stamp file 1 minute before the time 
you actually want the job to run.  It'll still run the jobs when the 
system starts up, much like anacron does with these jobs on 
Fedora/RHEL/Ubuntu/Debian systems, but after that they should run at the 
times you want.

On 06/13/2008 12:00 PM, John Lange wrote:
> 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...
> 

-- 
Gilles R. Detillieux              E-mail: <grdetil at scrc.umanitoba.ca>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/
Dept. Physiology, U. of Manitoba  Winnipeg, MB  R3E 3J7  (Canada)


More information about the Roundtable mailing list