Using Windows Task Scheduler
The Windows Task Scheduler allows you to schedule programs to run at specified times. For example, you can schedule nightly job cycles to run automatically.
The following example shows how to logon to a z/OS server and submit a job. This .bat file contains commands to execute scripts that use the Logon and SubmitJCL methods. For examples of these scripts, see Logging on to a Server and Submitting JCL to a Server.
Rem This is a batch file that logs on to the z/OS Host.
Rem After logging on, a JCL member on the Host is submitted.
C:\\MyJobs\\WSCRIPT Logon.vbs HOSTNAME USERID PASSWORD
C:\\MyJobs\\WSCRIPT SubmitJCL.vbs M:\\USER999.CNTL.JCL\\MYJOB
Say 'Your Job was Submitted'
Pause
You can schedule this .bat file to run automatically using the Windows Task Scheduler. To access the Windows Task Scheduler:
-
Choose Programs>Accessories>System Tools>Scheduled Tasks from the Windows Start Menu. The Scheduled Tasks dialog box appears.
-
Click Add Scheduled Task and a wizard will guide you through the process.