On Saturday 07 May 2005 8:51 am, Anders Johansson wrote:
On Saturday 07 May 2005 17:39, Scott Leighton wrote:
And, how do I get cron.daily back to running at a reasonable time, like 4am or 5am in the morning?
touch "with your timestamp" /var/spool/cron/lastrun/cron.daily
Thanks! That solved it. I did have to use the -t switch on touch, e.g.,
touch -t 200505070500 cron.daily
Worked like a charm.
I don't think so. That unfortunately doesn't seem to set the correct time stamp. Try
find /var/spool/cron/lastrun -name cron.daily -printf "%c\n"
The timestamp you see there is the one that will control when it's run.
So far, the only way I've found to do it correctly is to do
at 5am
rm /var/spool/cron/lastrun/cron.daily touch /var/spool/cron/lastrun/cron.daily <ctrl-D>
Make sure atd is running (rcatd start)
You are correct, all I changed was the mtime and the cron script appears to be interested only in the ctime. A bit of googling seems to indicate that it is not possible to change the ctime, the only way is the one you mention above, delete the file and create a new one. I don't think I like this new way of handling crontabs. Seems it is needlessly complex to me. Thanks for pointing out the issue, I wouldn't have noticed until tomorrow that the original solution failed! Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.11.4-20a-default x86_64