Skip to content

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 log on 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.cs HOSTNAME USERID PASSWORD

C:\\MyJobs\\WSCRIPT SubmitJCL.cs 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:

  1. Choose Programs>Accessories>System Tools>Scheduled Tasks from the Windows Start Menu. The Scheduled Tasks dialog box appears.

  2. Click Add Scheduled Task and a wizard will guide you through the process.

Back to top