Overview

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

The Scheduler allows you to define when specified scheduled tasks should be executed. This is useful when you want some functionality to be performed automatically at a specific time or regularly over a certain time period.

 

In addition to other functions within the system, the scheduler is used to execute tasks for the following modules:

 

Content staging
E-commerce (E-commerce Guide -> Configuration settings -> Deleting old shopping carts)
E-mail queue
Newsletters
On-line users
Project management
Smart search
Time zones
Web analytics
Web farm synchronization

 

How it works

 

Individual tasks have a specified time interval that determines when they should be considered as ready to be executed. The exact time when tasks are actually executed depends on the settings of the scheduler.

 

By default, the scheduler performs a check at the end of standard page requests and runs the tasks that are ready to be executed. This means that tasks are executed only when user activity on your website is generating requests.

 

Alternatively, the scheduler can be configured to process tasks regularly according to an automatic internal timer, regardless of website activity. This can be done by adding the CMSUseAutomaticScheduler key into the /configuration/appSettings section of your web.config file, as shown below:

 

<add key="CMSUseAutomaticScheduler" value="true" />

 

The Scheduler interval setting found at CMS Site Manager -> Settings -> System determines how often the scheduler checks if there are any tasks ready to be executed. This setting can be useful even if tasks are checked based on page requests, since it sets the minimum interval between checks (e.g. to save resources on sites with high traffic). On the other hand, it is not recommended to set the value too high, since some parts of the system that utilize scheduled tasks work best when executed fairly often.

 

Additional low-level scheduler settings can be done by adding the keys listed in the Scheduler settings section of Appendix C - Web.config parameters of the Developer's guide.

 

 

 

Scheduling reliability

 

Since the scheduling process runs within the ASP.NET process, tasks will not be executed if your website is not running. This happens when the process is recycled without being started again (after a long period of website inactivity).

 

If you want to run the scheduling reliably, it's necessary to ensure that your website is always running. You can do that by using some utility or an external service that requests the home page of your website on a regular basis.

 

Page url: http://devnet.kentico.com/docs/5_5r2/contexthelp/index.html?scheduled_tasks_overview.htm