executeJob Step

Last published at: April 6th, 2021

Description:

Executes a SQL server job.  

Inputs

  • connectionString – database connection string
  • jobName – MS SQL server job name 

Returns

  • True – step executed successfully
  • False – step failed to execute

Usage:

Please refer to SQL Server documentation on how to setup a SQL job within Microsoft SQL Server: 

https://docs.microsoft.com/en-us/sql/ssms/agent/create-a-job?view=sql-server-2017#SSMSProcedure

Example:

Let’s build and execute the executeJobDef example.                            

  • Create a new definition called “executeJobDef”
  • Select the definition and click the “design” button
  • Drag a executeJob step to the canvas
  • Connect the dots between the start and executeJob step

  • Click on the “executeJob” step to configure its properties
  • Configure the following values for the properties as shown on the below graphic

  • Save the workflow definition, create a workflow instance and execute. Step should execute the job in selected database server.