---
title: Processing scheduled tasks on the live site
related:
  - https://docs.kentico.com/13/configuring-xperience/scheduling-tasks/configuring-scheduled-task-execution.md
  - https://docs.kentico.com/13/developing-websites/developing-xperience-applications-using-asp-net-core.md
  - https://docs.kentico.com/13/developing-websites/mvc-development-overview.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

Most default [scheduled tasks](https://docs.kentico.com/13/configuring-xperience/scheduling-tasks.md) 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 has the advantage that any performance requirements are offloaded from your live site application.

However, the system also allows you to schedule **site-specific** tasks that are executed by the live site application. For example, you can use this option if you wish to create a custom task that works with the application memory or the local file system.

To run scheduled tasks on the live site:

1. [Enable the scheduler for your live site application](#enabling-the-scheduler-on-the-live-site).
2. [Configure individual tasks to run on the live site](#configuring-tasks-to-run-on-the-live-site).

## Enabling the scheduler on the live site

Developers need to enable the scheduler on the side of the live site application:

<!-- dev-model:mvc start -->

**MVC 5 development model.** Applies only when building with ASP.NET MVC 5. If this page also covers ASP.NET Core, that version is in its own block.

1. Open your live site project in Visual Studio.
2. Enable the scheduler feature by calling the **UseScheduler** method of the _ApplicationBuilder_ instance.

   - Enable the feature at the start of your application's life cycle, for example in the **Application\_Start** method of your project's **Global.asax** file.

     > **Info:** MVC projects created by the [installer](https://docs.kentico.com/13/installation/installing-xperience.md) contain the _ApplicationConfig_ class, whose _RegisterFeatures_ method is called in the _Application\_Start_ method by default. You can use this class to encapsulate all of your _ApplicationBuilder_ code (enabling and configuring of Xperience MVC features).

     ```csharp

     using Kentico.Web.Mvc;

     ...

     protected void Application_Start()
     {
         ...

         // Gets the ApplicationBuilder instance
         // Allows you to enable and configure selected Xperience MVC integration features
         ApplicationBuilder builder = ApplicationBuilder.Current;

         // Enables the scheduler feature, which starts the automatic scheduler
         builder.UseScheduler();

         ...
     }

     ```

<!-- dev-model:mvc end -->

<!-- dev-model:core start -->

**ASP.NET Core development model.** Applies only when building with ASP.NET Core. If this page also covers MVC 5, that version is in its own block.

1. Open your live site project in Visual Studio.
2. Edit your application's startup class (**Startup.cs** by default).
3. [Enable](https://docs.kentico.com/13/developing-websites/developing-xperience-applications-using-asp-net-core/starting-with-asp-net-core-development/enabling-xperience-features-in-asp-net-core-applications.md) the scheduler feature by calling the **UseScheduler** method of the _IFeaturesBuilder_ delegate passed to the _IServiceCollection.AddKentico_ method within _ConfigureServices_.

   ```csharp

   using Kentico.Web.Mvc;

   ...

   public void ConfigureServices(IServiceCollection services)
   {
       ...
       // Enables and configures Xperience features
       services.AddKentico(features =>
       {
           // Enables the scheduler feature, which starts the automatic scheduler
           features.UseScheduler();
           ... 
       });

       ...
   }

   ```

<!-- dev-model:core end -->

Enabling the _UseScheduler_ feature starts the automatic scheduler. The scheduler then sends requests to the _\~/CMSPages/Scheduler.ashx_ system route, based on the interval [configured in the settings](https://docs.kentico.com/13/configuring-xperience/scheduling-tasks/configuring-scheduled-task-execution.md). The requests ensure processing of scheduled tasks that are ready to run.

You can now configure individual tasks to run on the live site.

## Configuring tasks to run on the live site

After [enabling the scheduler feature](#enabling-the-scheduler-on-the-live-site) for your live site application, you can configure site-specific scheduled tasks to be executed on the live site:

1. Open the **Scheduled tasks** application.

2. Select the appropriate **Site**.

   > **Info:** **Global tasks**
   >
   > Global tasks are always processed by the administration application. If you wish to run a global task on the live site, you need to create a separate copy:
   >
   > 1. Switch to the _(global)_ task listing.
   > 2. Expand the **Other actions** (**...**) menu next to the given task.
   > 3. Select **Clone**.
   > 4. Adjust the task's display and code names as required.
   > 5. Click **Show advanced settings**.
   > 6. Select your site in the **Clone to site** field.
   > 7. Click **Clone**.You can now configure the new site-specific task to run on the live site.

3. Create a **New task** or edit an existing one.

4. Switch the **Run task on** option to _Live site_.

5. Adjust the [task properties](https://docs.kentico.com/13/configuring-xperience/scheduling-tasks/reference-scheduled-task-properties.md) as required.

6. Click **Save**.

The task will now be executed by your live site application.
