)

Processing scheduled tasks in MVC

When using the MVC development model, the MVC live site application does NOT execute scheduled tasks. Tasks only run on the Kentico administration application. Most default scheduled tasks process or update data in the shared database, so running only on the administration application is sufficient.

Because the Kentico administration application does not receive traffic from live site visitors, it may not reliably run the default request-based scheduler, and may also shut down after being idle for some time.

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

  1. Configure the Kentico administration application to use Automatic scheduler mode.
  2. Set the Start Mode advanced setting of the used application pool in IIS to AlwaysRunning. This ensures that the Kentico application's worker process does not shut down if no one uses 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 Kentico 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 Kentico application.


Was this page helpful?