Create an On-Demand GP Agent Task

< Back
You are here:

To create an On-Demand GP Agent Task, you first need to create a task that you want to run and then create the On-Demand task and select the task to be run as the sub task. For example, we want to run IV Reconcile when all users are out of the system.

First, we create the IVREC task to handle IV Reconcile:

IV Reconcile Task

Once you have created the “IVREC” task, create a new On-Demand task “IVREC-OD” and assign the “IVREC” task as the first sub-task:

On-Demand Task

Now add a SQL trigger (see KB article below) or some other custom process to tell GP Agent it’s time to run the “IVREC-OD” task. The On-Demand task will not run until you update the GP Agent table to tell it to run. You can either call the mc2GPASetTriggerStatus stored procedure in the system (usually DYNAMICS) database or include the following statement in your trigger or custom process: update TPSTSET set Task_Status = 10.

Note that, when creating the On-Demand Task, you can assign additional GP Agent tasks to run. Sub-tasks will run in sequence in the order you choose.

Requires GP Agent 14.0m48 or higher for GP 2015R2 or GP Agent 16.0m015 or higher for GP 2016.