cancel
Showing results for 
Search instead for 
Did you mean: 

TimeWindows for Summer/Winter Pacific Time

nanda_kumar21
Active Contributor
0 Kudos

Hi Everyone,

CPS build M33.104.

We have two jobs, one for PST and another for PDT and are mutually exclusive.

The days on which the Day light savings switch happens is not constant, it changes from year to year.

2015 - Mar 8 - Nov 1

2014 - Mar 9 - Nov 2

How do i create a time window that is open only for summer and another, only for winter.

thanks

Nanda

Accepted Solutions (1)

Accepted Solutions (1)

gmblom
Active Contributor
0 Kudos

Hi Nanda,

I must admit this is a very interesting request and I am trying to think of alternative implementations as no Time Window element currently exists that can test for DST changes.

My question is: in what sense are these jobs mutually exclusive. The main reason I can think of is that these are actually the same jobs, but they might require different scheduling or parameter sets. If that is the case you can resolve that with dynamic parameter settings based on the date or using preconditions or time windows to change the scheduling.

You can also put both jobs in the same step and put a preconditions on the jobs to test if the offset is correct depending on whether DST is active or not.

For instance: =Time.format(Time.now('PST'), 'Z') === '-0700' // Check the current offset, if it is -0700 we are in summertime

Regards Gerben

nanda_kumar21
Active Contributor
0 Kudos
  1. Yes, it is the same program, but two different variants to account for the change in time.
    1. We could have done the dynamic parameter setting, but resorted to time window option because it will be resuable for any other new jobs.
  2. The time expression worked, so we created a job chain.
  3. An option to create a time window would have been more flexible solution.

thanks

Nanda

Answers (1)

Answers (1)

Dave_S
Explorer
0 Kudos

First, I will admit to knowing almost nothing about CPS.

But consider that even though the start and end of summer/winter, or daylight saving time, fall on different dates each year, those do follow rules. In the United States, "daylight saving time starts on the second Sunday in March and ends on the first Sunday in November, with the time changes taking place at 2:00 a.m. local time" [Daylight saving time in the United States - Wikipedia, the free encyclopedia]. Perhaps you can work with these rules to create the time windows.