You are here: Architecture > Long Running Processes and Scheduling

Long Running Processes and Scheduling

Long running process are tasks that can take long time to execute or have to be performed regulary. These are the tasks like search indexing, processing payment plans and so on. EPiServer Commerce uses quart ( to execute scheduled jobs. It is running as a windows service and is specific for each EPiServer Commerce "application". You should have one running after the installation is complete.

These jobs are configured in quartz_jobs.xml file.

To add a new scheduled job do the following:

1. Create a job class that implements IStatefulJob interface.

public class PaymentPlanJob : IStatefulJob
        private readonly ILog _Log = null;
        /// <summary>
        /// Initializes a new instance of the <see cref="PaymentPlanJob"/> class.
        /// </summary>
        public PaymentPlanJob()
            _Log = LogManager.GetLogger(GetType());
        #region IJob Members
        /// <summary>
        /// Executes the specified context.
        /// </summary>
        /// <param name="context">The context.</param>
        public void Execute(JobExecutionContext context)
            string applicationName = context.JobDetail.Group;
            if (String.IsNullOrEmpty(applicationName) || applicationName == "all") // index all applications
                AppDto dto = AppContext.Current.GetApplicationDto();
                foreach (AppDto.ApplicationRow row in dto.Application)


2. Define Job details.

	<description>This job processes recurring payments.</description>
	<job-type>Mediachase.Commerce.Services.PaymentPlanJob, Mediachase.Commerce.Services.PaymentPlanJob</job-type>


3. Define Job trigger which determines how often the job is executed.

		<description>Fires Payment Plan Job</description>


4. Restart "Mediachase eCommerce Framework Quartz (ApplicationName)" windows service.

Provided Out of the Box Jobs


Version: EPiServer Commerce 1 R2 SP1 | Last updated: 2012-02-13 | Copyright © EPiServer AB | Send feedback to us