Gateway Task Results
Gateway task execution is reported in the agent_events table in the controller’s configured database. The individual result of the task execution for each agent is report as a separate entry. For example, the following query will return the results of all task executions:
select * from agent_events where event_category = 'task' order by event_time desc;
A task that completed normally for an agent will contain the text NORMAL in the event_level field. If an error occurred for an agent, the event_level field is set to ERROR, and the error message is recorded in the message field.
Running a Task Outside its Schedule
You can run any task outside the task’s normal schedule by clicking the More button and “run now” link on the right side of the task. Keep in mind:
- Tasks that have been scheduled to run immediately are already running, and the “run now” link will not be visible.
- A task that has been scheduled to execute only once at a scheduled time or after a delay will be rescheduled to run immediately. The task will not run again after it has been rescheduled.
- A scheduled task will continue to run at its normally scheduled time, even if you run the task now.
Pausing and Canceling Tasks
Pause and Resume
After most tasks are created, they are put onto the task schedule. The exception to this is on demand tasks, which are not put on the schedule until you click the "run now" link. After a task has been added to the schedule, you can pause and resume the task. The state of the task (scheduled, running, waiting) and the scheduling configuration affect how the task is paused and resumed.
|Task configuration||Pause action||Resume Action|
|Task is currently running or waiting||System will attempt to cancel outstanding calls to remote servers.||System will run the task again against any servers that were outstanding when the task was paused.|
|Task is scheduled once at a specific date and time||The task will be temporarily taken off the schedule.||If the specified time has not yet arrived, the task will be put back onto the schedule at the original time. If the specified time has already passed, the task will execute immediately upon resume.|
|Task is scheduled once after a specified delay||The task will be temporarily taken off the schedule.||The task will be put back onto the schedule at the original calculated time. For example, if the delay is set to 2 hours, and the task is paused for 1 hour, the task will fire in 1 hour after resume. If the delay period has already passed, it will fire immediately after resume.|
|Task is on a recurring schedule||All future iterations of the task will be temporarily taken off the schedule.||The task will not fire if task iterations have been missed when the task was paused. The task will return to firing on its normal schedule.|
Scheduled one-shot tasks can be cancelled at any time before the task starts. Scheduled one-shot tasks include tasks that are scheduled to fire once after a delay or fire at a specific time. Running tasks can also be cancelled, but there are no guarantees about how much of the task is processed at the time of cancel. Keep in mind that cancelling a task will cause also delete the task at the same time, and it cannot be retrieved after cancel.