Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

It's that time of year again 1

Status
Not open for further replies.

columb

IS-IT--Management
Feb 5, 2004
1,231
EU
I know this question comes up every year at about this time (and again in October) but a search of the AIX forum doesn't return any threads that answer my question

OK, early on the morning of Sunday 26th March the clock on all my AIX 5.1 servers will change. The two questions are
[ol]
[li]When exactly will the change happen (will it be 01:00 becomes 02:00 for example)?[/li]
[li]What happens to cron/at jobs scheduled for the gap?[/li]
[/ol]
Just for completeness
Code:
$ echo $TZ
GMT0BST,M3.5.0,M10.5.0

Thanks

Columb Healy
 
Columb, my $TZ is:

GMT0BST,M3.5.0/02:00:00,M10.5.0/03:00:00

I take it that 2:00 in March will become 3:00 and 3:00 in October will become 2:00.

Should you have any jobs scheduled between 2:00 and 3:00 in March, I suggest you reschedule them to post 3:00 pm if possible. That's the extent of my knowledge anyway - someone may know whether cron is clever enough to differentiate on that particular night, but I doubt it is.

Can someone prove me wrong?
 
Of course "them to post 3:00 pm" should have read "them to post 3:00 am". Time to go home methinks!
 
Seems to be okay, i've the same

NFT-1DFT-02:00:00,M3.5.0/02:00:00,M10.5.0/03:00:00
 
Thanks Ken.

Since I posted I found thread80-519518 which supports the 02:00 -> 03:00 and 03:00 -> 02:00 defaults. It didn't answer the point about the cron jobs.

I might set some suitable cron job on my play box to see what happens. I'll update this thread in three weeks or so.

Columb Healy
 
there is a decent description in the cron man page on how this affects cron jobs.
 
The script I'll use will be
Code:
"test_cron.ksh" [New file] 
#!/bin/ksh
 
export RFNAME=/tmp/crontest.runno
export RFLOG=/tmp/crontest.log 
 
[[ -f $RFNAME ]] && RUNNO=$(cat $RFNAME) || RUNNO=0
echo This is call to $0 number $RUNNO at $(date +%y%m%d_%H:%M) >> $RFLOG
expr $RUNNO + 1 > $RFNAME

Columb Healy
 
Thanks hfaix

It's time I took my own advice to RTFM!

Columb Healy
 
I actually set up cron jobs last fall to capture what happens during the switch from daylight savings to standard time. It revealed an interesting (at least to me) programming decision. Here's a snippet from the log (time as entered in cron on left, actual time on right)

Code:
00:59 cron check at Sat Oct 29 00:59:01 CDT 2005
01:00 cron check at Sat Oct 29 01:00:00 CDT 2005
01:01 cron check at Sat Oct 29 01:01:00 CDT 2005
01:59 cron check at Sat Oct 29 01:59:01 CDT 2005
02:00 cron check at Sat Oct 29 02:00:00 CDT 2005
02:01 cron check at Sat Oct 29 02:01:00 CDT 2005
00:59 cron check at Sun Oct 30 00:59:00 CDT 2005
01:00 cron check at Sun Oct 30 01:00:00 CDT 2005
01:01 cron check at Sun Oct 30 01:01:00 CDT 2005
01:59 cron check at Sun Oct 30 01:59:00 CDT 2005
[COLOR=red]02:00 cron check at Sun Oct 30 01:00:01 CST 2005[/color]
01:01 cron check at Sun Oct 30 01:01:00 CST 2005
01:59 cron check at Sun Oct 30 01:59:00 CST 2005
02:00 cron check at Sun Oct 30 02:00:00 CST 2005
02:01 cron check at Sun Oct 30 02:01:00 CST 2005

I'd venture that most of us consider the fall switch to be "at 2:00 you turn back the clock to 1:00". But in reality, you can't have both 2:00 and the second 1:00 without introducing an extra minute, or an extra second if you think of it as changing from 02:00:00 to 01:00:00.

So you have to lose one of those times on the cusp of the change. I'm sure the decision of which second to lose has been ANSI codified, but it was interesting (again, at least to me) to see that it went from 02:00:00 to 01:00:01 (the 02:00 job ran twice, the 01:00 didn't).

So if you're stupid insane brave enough to live on the edge, you can theoretically schedule jobs for 01:00 in the fall. If I remember, I'll check things out in a couple weeks to get the skinny on springing forward.

Personally, I'll stick with considering anything between 01:59 and 03:01 a cron scheduling no man's land. It still leaves me with 95.69% of the day for scheduling, and I'm not greedy.

Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

 
Ya know, you try real hard not to screw up any of the times in a post about daylight/standard switches......but sometimes you just stumble at the finish line.

the "no man's land" should be anything between 00:59 and 03:01, and the percentage of the day free is 91.52%.


At least I beat everyone else to correcting me (I hope).

:)

Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top