Schedule bi-weekly job.

155 pts.
Tags:
AS/400
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?

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • SheldonLinker
    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)
    30 pointsBadges:
    report
  • graybeard52
    Another option is to run the job once. Inside the job, have it calculate the next run date and submit that.
    3,115 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following