155 pts.
 Schedule bi-weekly job.
We have a job that needs to run every two weeks (bi-weekly). The job scheduler (WRKJOBSCDE) only allows daily, weekly or monthly freguencies. Is there another way to schedule bi-weekly jobs?

Software/Hardware used:
ASKED: January 27, 2006  11:06 AM
UPDATED: November 26, 2009  1:27 PM

Answer Wiki:
You could use a data area to hold the next date to be run. If the job runs every two weeks, you could add 14 to the data area as the last step in the process. The job would compare the system date against the data area and execute if it's the correct date. If the job runs on specific dates in the month (1st and 15th), the data area would contain the next date to be run. This may not be the most sophisticated solution, but I believe it will satisfy your requirements. You would need an entry in the job scheduler to execute the job. ============================================================= Rather than running daily and counting down, create a *LGL data area and schedule the job weekly. Retrieve the data area and stash the value in a *LGL variable. Update the data area to be (*NOT &LGLvar). End the run if &LGLvar is one value; execute the code if it's the other. The data area can be updated manually (externally) if you want the job to run a week early or late. Tom
Last Wiki Answer Submitted:  November 25, 2009  4:01 am  by  HowieK   0 pts.
All Answer Wiki Contributors:  HowieK   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

There’s a simple work-around if no scheduler expert comes through: Schedule weekly. First thing in the job, determine if this is the right week. If not, return immediately.

Sheldon Linker (sol@linker.com)
Linker Systems, Inc. (www.linkersystems.com)
800-315-1174 (+1-949-552-1904)

 15 pts.

 

Another option is to run the job once. Inside the job, have it calculate the next run date and submit that.

 3,115 pts.