Scheduling tasks

Xperience provides a scheduler, which allows the system to run tasks and perform various operations at a specific time or repeatedly after a certain time interval. Many default Xperience features leverage scheduled tasks, and developers can create custom tasks that perform any required function.

Most scheduled tasks are intended to be processed by the Xperience administration application. The tasks typically manage or update data in the shared database, so running on the administration application is sufficient. Executing tasks via the administration also offloads any resulting performance requirements from your live site application. However, you need to keep the administration application running to ensure reliable processing of scheduled tasks.

The scheduler also supports site-specific tasks that run on the side of the live site application. For example, this can be useful for tasks that work with the application memory or the local file system. To learn how to set up such tasks, see Processing scheduled tasks on the live site.

Configuring scheduled task execution

To configure how and when the scheduler processes tasks:

  1. Open the Settings application.
  2. Select the System category.
  3. Adjust the settings in the Scheduler section.
  4. Click Save.

See Configuring scheduled task execution for more information.

Keeping the administration application running

Because the Xperience administration application does not receive traffic from live site visitors, it may shut down after being idle for some time (and may not run reliably in the request-based scheduler mode).

To ensure that scheduled tasks get processed regularly, we recommend using the following approach:

  1. Use the default Automatic scheduler mode for the Xperience administration application.

  2. Set the Start Mode advanced setting of the used application pool in IIS to AlwaysRunning. This ensures that the Xperience application’s worker process does not shut down if no one accesses the administration interface for a certain period of time.

    If you do not want to use the AlwaysRunning setting, you can alternatively keep the application alive by sending automated requests to your Xperience application within the time-out interval.

You can also set up the Scheduler Windows service to process many types of scheduled tasks independently from the Xperience application.

Managing scheduled tasks

Scheduled tasks can be managed and configured in the Scheduled tasks application of the administration interface.

Two types of tasks are available:

  • Global – affect the entire system (global features and objects). Only available for users with the Global administrator privilege level. Choose the (global) option in the Site selector. Global tasks are always processed by the administration application’s scheduler.
  • Site-related – tasks that affect content related to the selected Site. Site-related tasks can be configured to run either on the side of the administration application or the live site.

Managing scheduled tasks for a site

The System tasks tab provides an overview of temporary tasks created dynamically by the system. System tasks internally provide functionality for various Xperience features. You cannot manually create system tasks.