Does the job have to run on the exact hour? If not you could have it kick off from the job scheduler at the start of the day, run and then do DLYJOB that will run it again in about an hour. So if the job takes 5 minutes to run, delay for 55 minutes. If it takes 10, delay for 50.
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Ken Sims
Sent: Tuesday, December 16, 2014 10:59 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Consolidating jobs.
Hi Rick -
On Tue, 16 Dec 2014 21:03:14 -0500, Rick Mason <rmason62@xxxxxxxxx>
wrote:
I have a program that is currently submitted 3 times daily via the job
scheduler.
The manager is now requesting the job be run every hour between the
hours of 5am and 11pm.
What would be the more efficient way to accomplish this other than
creating way to many job scheduled entries for the same job.
I use a lot of self-submitting jobs like others have recommended, however this case I would have just one job run each day (which could run from the scheduler).
A CL program would do something like:
1. Retrieve and save the QHOUR system value.
2. Do whatever the main processing is.
3. Delay for 15 seconds.
4. Check for a controlled job end and terminate if true.
5. Retrieve the QHOUR system value.
6. If the same as the last saved value, go back to step 3.
7. Otherwise save this new value and go to step 2.
There are various ways to spif this up.
For instance, you could have a method to force the processing to occur immediately, in which case you might want to have a minimum number of 15-second delays that must occur between executions of the main processing.
Ken
Opinions expressed are my own and do not necessarily represent the views of my employer or anyone in their right mind.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.