With external program tasks, you can trigger external processes, such as scripts or .exe files. Task chaining is supported and you can combine reload tasks with external program tasks.
Do the following:
In the QMC, open Tasks.
Click External program task to create a new external program task, or double-click an existing task to edit it.
Enter a task name.
Enter a path to the file to trigger.
Enter input parameters for the file to trigger, if any.
Optionally, edit the settings in the section EXECUTION.Information noteTask session timeout: The maximum period of time before a task is aborted. When a task is started, a session is started by the manager scheduler and the task is performed by one of the nodes. If the session times out, the manager scheduler forces the node to abort the task and remove the session.
A task must have at least one trigger to be executed automatically. Manage the triggers by clicking Actions in the Triggers table heading and selecting one of the following:
- Create new once-only trigger, Create new hourly trigger, Create new daily trigger, Create new weekly trigger, or Create new monthly trigger. These are trigger shortcuts and the trigger that you select is added to the table instantly. The start value for the trigger is set to 5 minutes from when it was created and the trigger is enabled.
- Create new scheduled trigger or Create new task event trigger to create a new trigger of the selected type (see the property descriptions below). A dialog opens. Edit the trigger and click OK to close the dialog and add the trigger to the table.
- Edit if you want to open the edit dialog for the trigger that is selected in the table. Edit the trigger and click OK to close the dialog and save your changes.
- Delete if you want to delete the trigger that is selected in the table.
Clicking undo () in the Triggers heading applies to all triggers you are currently editing.
Scheduled trigger properties Property Description Trigger name Name of the trigger. Mandatory. Enabled
Status of the trigger. When selected, the trigger is active.
The time zone of your operating system, at the time you create the trigger. When you save a trigger, the settings are kept, and if you move to a different time zone, the original values are still displayed. If you want to change the time zone and start time of a trigger, you need to do that manually.Information noteFor a trigger that was created before the introduction of the time zone setting, all times and dates are by default presented in Coordinated Universal Time (UTC).
Daylight saving time
Way to account for daylight saving time.
Observe daylight saving time: This option takes daylight saving time (DST) into account. If DST is in use in the selected time zone, the execution time and date are adjusted accordingly.
Permanent standard time: This option does not take DST into account. If DST is in use in the selected time zone, the execution time and date are not adjusted.
Permanent daylight saving time: This option takes DST into account. If a time zone uses DST, execution time and date are always according to DST, even during periods when DST is not in use.Information noteFor time zones not using DST, always select Permanent standard time.
You created a trigger for an event at 10:00 AM, while you were working in Ottawa, Canada, in January. The time zone is (GMT-0500) Eastern Time (US & Canada) and DST is used between March and November.
If you select Observe daylight saving time, a trigger set to start at 10:00 will always start at 10.00.
If you select Permanent standard time, a trigger set to run at 10:00 will run at 10:00 in the winter but at 09:00 in the summer.
If you select Permanent daylight saving time, a trigger set to run at 10:00 will run at 11:00 in the winter and at 10:00 in the summer.
Start time and date:
- Start time: (hh:mm)
- Start date: (YYYY-MM-DD)
Frequency of the trigger:
Hourly. Time period between executions of the trigger. Edit Repeat after each by typing the values for:
- hour(s) (default is 1)
minute(s) (default is 0)
Daily. Time period between executions of the trigger. Type a value for Every day(s) (default is 1). For example, type 2 to repeat the trigger every second day.
Weekly. Time period between executions of the trigger:
- Type a value for Every week(s) (default is 1).
Select one or more days under On these weekdays to determine which days the trigger is repeated (on the weeks you have specified). For example, type 3 and select Mon to repeat the trigger on Mondays every third week.
Monthly. Select one or more days under On these days to define the days when the trigger is repeated every month.Tip noteIf you have selected Monthly and want to be sure that a trigger is repeated every month, you need to select a day no later than the 28th.
End time and date:
- End time: (hh:mm)
- End date: (YYYY-MM-DD)
Select Infinite to create a trigger with no end date.
Task event trigger properties Property Description Trigger name Name of the trigger. Mandatory. Type Trigger type. Enabled Status of the trigger. When selected, the trigger is active. Time constraint
Time frame (in minutes) that the other tasks in the task chain must be completed within. There is no effect if the trigger consists of only one task.
Do the following:
Information noteA task with trigger condition Task failed is started not only when the preceding task finishes with status Failed, but also with status Skipped or Error (when the error occurs before reload). In Qlik Sense versions prior to February 2019, a preceding task with status Aborted also started a task with trigger condition Task failed. To enable this behavior, set "DisableLegacyTaskEventTriggerBehavior" to false in Scheduler.exe.config on all Scheduler nodes.
Click Add task to add a tasks that will function as a trigger condition.
A Status list and an empty Task field is added.
Click the empty field to add a task.
A task selection dialog is opened and displays a list of tasks with the following columns: Name, App connected to the task, and Tags, which is the task name.
Double-click the task to use as a trigger condition.
The task is added to the trigger and the dialog is closed.
In the Status list, select whether the trigger condition is fulfilled on TaskSuccessful or TaskFail.
Repeat the steps above for all the tasks that you want to include in the trigger. A task can only be added once and is not displayed in the task selection dialog if it has already been added to the trigger. There is a logical AND between the tasks.Information noteThe tasks do not need to be executed in any specific order and the Time constraint is not static. If all tasks but one have completed when the end of the time frame is reached, the task that was first completed is no longer considered executed and the end of the time frame is recalculated. The trigger then waits for all tasks to be completed within the recalculated time frame.
- Optionally, add tags and custom properties.
Click Apply to save the task.