× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi, David:

Use the built-in Job Scheduler (WRKJOBSCDE) to schedule those jobs to run every Tuesday (J1), Wednesday (J2) and Thursday (J3).

When each job runs, it checks a data area to see when it last ran. If the difference between today's date and the date it last ran (stored in the data area) is less than 14 days, then it is "too soon" and the job should just end normally without doing anything. Otherwise, the job updates its data area with today's date and then performs whatever processing is needed. (You need a separate data area for each job.)

Does that help?

Mark S. Waterbury

> On 9/29/2010 9:04 AM, David FOXWELL wrote:
Hi all,

I have a 3 jobs J1, J2 and J3 that will run every two weeks on Tuesday, Wednesday and Thursday respectively.

I want to know what will be the next planned date of the job. Eg, today is the 29th, J3 will run either tomorrow or the 6th October.

If I set a reference date as the first Tuesday of this year, ie, the 5th of January, can I get my job date from any given date?

I was thinking of setting the 5th of January as week 1, so to find my date for the next J1, I would calculate the number of weeks between the 5th of January and today, divide by 2 to see if it's this week or next week and get the next Tuesday.

Am I making any sense? Would SQL or RPG be the best tool?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.