Operating System - OpenVMS
1753797 Members
6715 Online
108799 Solutions
New Discussion юеВ

VMS Batch Queue Job and Daylight Savings Time

 
SOLVED
Go to solution
Ken_180
New Member

VMS Batch Queue Job and Daylight Savings Time

This spring, the area I live in will be begin observing Daylight Savings Time and we were examining the consequences of the time change to a job that runs on a batch queue every hour by resubmitting itself. In the Spring, when the server's time is moved forward, the batch job should run because the new time will be after the scheduled run time. However, in the Fall, when the server's time is moved back, the job will not run for two hours. I would appreciate receiving any ideas on how to get the job to run every hour even when the time is set back. Thanks!
12 REPLIES 12
Robert_Boyd
Respected Contributor
Solution

Re: VMS Batch Queue Job and Daylight Savings Time

Ken,

Here's one relatively simple idea:

Add code into the job so that it calculates to see when the next Fall time change will be and have it compare the next run time with that to see if the next run will be at or after the change. If so, have it submit another job which will sit and wait in a loop for the time change to occur (simply take a time value every minute or whatever interval you like ... and see if it is less than the previous one). When it detects the time change, it resubmits the original job to run immediately(or whatever interval after the top of the hour that it should run).

Alternatively, you could incorporate the wait loop in the same job as part of the resubmit code.

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
Robert_Boyd
Respected Contributor

Re: VMS Batch Queue Job and Daylight Savings Time

I meant to mention that I already have code that I could give you that does the next time change calculation for EST. You'd have to adapt it to your own situation.

Ideally the routine would interpret the logical names that control the TDF/Daylight Savings rules in SYS$TIMEZONE_RULE for its input.

I may just have to edit the procedure I already have to get its input from the logical if it's available and post it here or on the DCL website.

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
Ken_180
New Member

Re: VMS Batch Queue Job and Daylight Savings Time

Robert,

Yes I would like to see your code. Thanks!

Ken
Robert_Boyd
Respected Contributor

Re: VMS Batch Queue Job and Daylight Savings Time

Here is daylight_check.com -- I'll also post cvtime.com which is called by this procedure.

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
Robert_Boyd
Respected Contributor

Re: VMS Batch Queue Job and Daylight Savings Time

here's cvtime.com -- useful for translating various keyword values to actual dates.

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
Robert_Boyd
Respected Contributor

Re: VMS Batch Queue Job and Daylight Savings Time

Here's a very involved procedure I wrote to manage TDF changes on cluster systems before the automatic change was available. This handles various UCX/TCPIP versions as well as VMS versions.

If you want an interesting challenge -- read through it and see if you can follow all of what it does! It has at least 3 if not 4 different modes it runs in depending on when/how it is invoked.

The most useful part for you Ken may be the section where it is trying to figure out what time NOW is relative to the next change.

I'm not suggesting you copy that code, but it could be useful as a framework.

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
Ian Miller.
Honored Contributor

Re: VMS Batch Queue Job and Daylight Savings Time

Robert, will you post your dcl procedures on
dcl.openvms.org as well as they may be useful to others.
____________________
Purely Personal Opinion
Wim Van den Wyngaert
Honored Contributor

Re: VMS Batch Queue Job and Daylight Savings Time

A very simple solution.

Replace the submit by a permanent job doing

$b:
$ wait 00:59:59
$ submit xxx
$ goto b

Wim
Wim
Jan van den Ende
Honored Contributor

Re: VMS Batch Queue Job and Daylight Savings Time

Re Wim:

Sorry, that does NOT work!

At 30 mins before the clock set backward do this will NOT wait one hour, but two hours!

At, say, 02:30, the WAIT evaluates the time to wake up as 03:30. But it takes 2 hours before 03:30 comes to pass....

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.