Submit Recurring Job
If you do not have access to the Advanced Job Scheduler on the IBM i servers, this program can help you to submit a job a recurring number of times. The source consists of the following
RTVJOBCNT - CMD - Retrieve Job Count RTVJOBCN#C - CLLE - Retrieve Job Count CL Program SBMRECJOB - CMD - Submit Recurring Job SBMRECJ#C - CLLE - Submit recurring Job CL PRogram
Using the program
If you issue the command SBMRECJOB, you have to provide the following fields:
Submit Recurring Job (SBMRECJOB) Type choices, press Enter. Command to submit . . . . . . . _____________________________________________ _______________________________________________________________________________ _______________________________________________________________________________ _________________ ...
Submitted Job Name . . . . . . . ____________ Character value Submitted Job User Profile . . . *CURRENT Character value, *CURRENT Submitted Job Queue to use . . . *JOBD Name, *JOBD Library Name . . . . . . . . . *LIBL Character value, *LIBL Allow duplicate jobs? . . . . . *YES *YES, *NO Number of recurring iterations 2 1-999 Delay between iterations . . . . 60 Delay in seconds (up to 24 hr) Bottom F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys
- Command to submit: Specify the command here. You can also prompt the command to give the correct values and parameters
- Submitted Job name: The command specified will be submitted using the specified job name.
- Submitted Job User Profile: Under which profile should the submitted job run. Can also specify *CURRENT for the user running the current job.
- Submitted Job queue to use: Specify a jobq to use for the submission. Can also specify *JOBD to use the JOBD from the user profile
- Allow Duplicate Jobs: If there should always be only one job with this name running, use *NO here. If you do not care whether the previous job ended or not, you can ignore duplicate jobs and specify *YES here
- Number of recurring iterations: Specify how many times this job will be submitted
- Delay between iterations: Specify here how may seconds delay should take place between submissions. This behaviour is also governed by the "Allow Duplicate Jobs" parameter:
- - Allow Duplicate Jobs = *YES - Delay will be between submissions. If the delay is 60 seconds, every 60 seconds a submission will take place
- - Allow Duplicate Jobs = *NO - Delay will be xx number of seconds after the one job ended and the next one is submitted again