cancel
Showing results for 
Search instead for 
Did you mean: 

Time window for every other monday

Former Member
0 Kudos

Hello

I have a requirement to create a time window which opens every alternate monday's. For Eg. If 1st of the month is monday and time window is open, then the next open period must be after 14 days. This time window has to be used as a precondition on the job with in a chain. I created one by hard coding the dates manually, but trying to find a way to automate this than manually maintain the time window by adding dates to it. Please help.

Thank You

Raghu

Accepted Solutions (1)

Accepted Solutions (1)

gmblom
Active Contributor
0 Kudos

Hello,

How should the frequency handle the new year? Should it 'reset' to the odd or even weeks? Or should it continue on the bi-weekly cycle?

If you just want odd or even weeks this is the best approach (and it does not require a complicated time window(!))

=Time.format(Time.now('America/New_York'),'u') === 0 && (Time.format(Time.now('America/New_York'),'w') % 2 === 0)


The first expression evaluates the day in the week number ('u'), with 0=Monday through 7=Sunday. The last expression evaluates the week of the year number ('w') and takes modulo 2 to get an even (0) or odd (1) result. In the last expression you can vary with 0 or 1 to determine odd or even weeks.


Also note the time zone you want to evaluate 'now' in.


Regards Gerben

Former Member
0 Kudos

Hello Gerben

Thanks for your response in regards to my query.

It doesn't matter odd or even weeks. On the new year it should just continue to execute bi-weekly basis. Is it possible? Please help.

Thank you

Raghu

Former Member
0 Kudos

Hi Raghu,

Did you ever figure out your time window, for job to run every other Monday's?

Former Member
0 Kudos

Hello Rick

Still have not found any time window other than adding the dates manually into the time window.

The solution provided by Gerben will not help in my situation because i dont want the week or day to be reset on a new year which is not the requirement i am looking for.

Any help will be appriciated

Thanks

Raghu

Former Member
0 Kudos

The one I use, I created via Submit Frame using a Time window. This way I do not have to scheduled my job using both Time window and Submit frame. I can schedule only using the Submit Frame.

First make sure you do have a Time window made for Monday only. Then create a new Submit frame. Then on the Element tab, you want to select Interval, then on the Submit every- place in 14 and on the drop box select Days. Then on the During Time Window, you want to place in your Monday time window. Also make sure the Skip when the time window is closed, is unchecked. After that is created, look at the Submits at tab and it will show you every other Monday, even into the new year.  If you want to use both elements, time window and submit frame, when scheduling a job, then you would still create that Submit frame for the 14 days, just would not use the Time window. When you go schedule the job, you would use the Submit frame for the 14 days and use the Time window of Monday. It all depends on your preference. I like to see and less elements.

Former Member
0 Kudos

Hi Rick

I cannot use the submit frame because i have to use the time window as a precondition on a job that resides within the chain. There are other jobs in this chain which runs everyday. But only this one job has to run every other monday. So submit frame cannot be used. In fact we already have a submit frame for every 14 days.

Thank You

Raghu

Answers (0)