tags:

views:

24

answers:

1

I have a cron job starting at 1 o'clock everyday

0 1 * * * somescript

the script downloads updates my files, however when I check my modified date the earliest file says it was modified at 3:30 A.M. and this happened for 2 days now, so I tried

*/1 * * * * date >> c:/date.txt

and saw that the date is fine. Is there something else throwing cron's timing off by 2 and a half hours? or does cron use some other timing that I need to correct?

If all else fails I guess I could just move my script timing up to 30 10 * * * but I'd like to get the time corrected/find out what I'm doing wrong.

My curl output:

Fri Jul 02 3:31:43 AM Central Daylight Time 2010

myfile

% Total % Received % Xferd Average Speed Time Time Time Current

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

100 273k 100 273k 0 0 427k 0 --:--:-- --:--:-- --:--:-- 460k

So it didn't take that long.

A: 

The cron entry seems correct. Did the file take a long time to download so the modification date was later? Or aanother process could have modified the files later on?

Tarski
It's a ~274 KB text file so I don't think that's the problem. I output my curl log with a time stamp at the top, here's what I have. It seems to be working correctly and didn't take a long time to download, I'll edit my question.
OK. That would seem to suggest something else modified it later on. Is it always modified at 3.30AM on the current day?
Tarski
I've only ran it two days, and yes, both days it has modified time ~3:30 AM. The script calls curl to download the file, but it seems from the download log curl only starts downloading at ~3:30AM so I suspect nothing is modifying it later and that's when my download script starts running.
Did you fix your problem?
Tarski
Yes, it seems that someone was using all the computers for a couple weeks to test some apps that messed with the time and just didn't tell anyone because he switched it back before we arrived...