Previous Topic: Example: Identify SQL Server Agent Job Using a Windows JobNext Topic: Example: Identify the Reason a SQL Server Agent Job Failed Using a Windows Job


Example: Run SQL Server Agent Job Using a Windows Job

After you identify the job, you can run it immediately using the RunJob operation.

This example runs a predefined job named MYJOB using a Windows job. The following CLI arguments are passed to the batch script:

To run a predefined job

  1. Create a Windows job in the Application.
  2. Enter the following information in the Basic page of the job definition:
  3. Click OK.

When the job completes successfully, it indicates that MYJOB has completed successfully on SQL Server Agent.