Preloading large apps provides immediate access for users, enhancing their experience by bypassing the time-consuming process of loading apps into memory. For example, preloading apps in the morning before work hours allows users to start work without waiting for apps to load.
Managing preload tasks
As an administrator, you can control app preloading through the Qlik Management Console, CLI, or API. Specify when to preload apps, how long they should remain loaded in memory, and on which nodes preloads are allowed.
For efficient resource management, consider configuring separate reload nodes to avoid taking resources from nodes where apps are preloaded and users work with apps. Select whether a node can do reloads, preloads, or both in the node settings. For more information, see Creating a node.
Configure sticky load balancing on the virtual proxy to ensure that when users open an app, it happens on the node where the app was preloaded. For more information, see Adding load balancing
You can chain preload tasks with reloads. For example, you can reload an app and then preload it, either on the same node or on separate nodes. For more information, see Creating a task chain
Monitoring preload tasks
The Tasks overview page shows configured preload tasks. There are two columns specific for preload tasks that you can add from the column picker:
Time to live (minutes): The configured number of minutes the app will stay loaded after preload.
Dedicated preload nodes: A list of the nodes that are selected for preloads. If empty, all nodes are available.
The Start and Stop buttons are disabled for preload tasks. To stop a preload or remove a preloaded app from memory, you need to restart the engine.
On the Engine health overview page, you can see how many apps are loaded into Engine. View the engine health details for a node to see which apps are loaded on the node.
Access to preload tasks
Access rights for preload tasks are identical to those for reload tasks. Preload tasks are treated like reload tasks in security rule properties and resource filters.
Creating a new preload task
You can create a preload task for an app from the Tasks overview page. The creation of a new preload task can also be initiated from Associated items on the App edit page, see Creating preload tasks.
Do the following:
Open the QMC: https://<QPS server name>/qmc
Select Tasks on the QMC start page or from the Start drop-down menu to display the overview.
Click Create new in the action bar.
The Edit preload task page is displayed.
Edit the properties.
Type the name of the preload task in the Name field.
Click Select app in the App name field.
A dialog opens. In the dialog, double-click the app that you want to preload by this task.
The dialog closes and the selected app is displayed in the App name field.
You can change the Execution properties, see descriptions below. The task is Enabled by default. Clear the selection to disable the task.
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.
Delete if you want to delete the trigger that is selected in 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.
You can change the Preload settings, see descriptions below. By default, an app is preloaded for 240 minutes and all nodes are available for preloads.
Optionally, apply tags.
Optionally, apply custom properties.
All fields are mandatory and must not be empty.
Identification properties
Property
Description
Default value
Name
The name of the task.
Preload task of <App name>
App
The name of the app that the task is created for. Click in the field to open a dialog where you can select (by double-clicking) which app the task preloads.
<App name>
Execution properties
Property
Description
Default value
Enabled
The task is enabled when selected.
Selected
Task session timeout (minutes)
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.
1440
Max retries
The maximum number of times the scheduler tries to rerun a failed task.
0
Scheduled trigger properties
Property
Description
Trigger name
Name of the trigger. Mandatory.
Enabled
Status of the trigger. When selected, the trigger is active.
Time zone
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.
Example:
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
Start time and date:
Start time: (hh:mm)
Start date: (YYYY-MM-DD)
Schedule
Frequency of the trigger:
Once.
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 Everyday(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 Everyweek(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.
Custom: When you select Custom, two new fields are shown, Filter and Increment. These options offer great flexibility when scheduling a reload. See Tasks - Custom option for details.
End
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.
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.
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.
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.
Preload properties
Property
Description
Time to live (minutes)
Determines how long an app remains in memory after preloading, even if it's not opened or reloaded during this time. The default value is 240 minutes.
Dedicated nodes
When dedicated nodes are added here, the load balancing algorithm will only consider these nodes for preloading tasks. If no nodes are added, all available nodes (configured to do preload tasks) are considered.
Ensure that the nodes you select are configured to allow preloads by enabling the Scheduler service and selecting Scheduler to do preloads in the node configuration.
Tags properties
Property
Description
Tags
Tip noteIf no tags are available, this property group is empty.
Connected tags are displayed under the text box.
Information noteIf no custom properties are available, this property group is not displayed at all (or displayed but empty) and you must make a custom property available for this resource type before it will be displayed here.
Click Apply in the action bar to apply and save your changes.
Successfully added is displayed at the bottom of the page.