Scheduled jobs

This topic is intended for administrators and developers with administration access rights in Episerver.

A scheduled job performs a specific task automatically when set to a date and time. An administrator can manually execute a scheduled job at any time. See Scheduled jobs.

The following Commerce scheduled jobs are available via the administration interface.

Subscription payment plans

Ensures that recurring paymentCommerce: Payments initiated by Commerce Manager on a regular cycle, used in a subscription-based scenario.s are regularly generated as a background process. Used for payment plans, such as magazine or grocery subscriptions, generating recurring payments.

Remove expired carts

Removes carts that are expired, that is, not accessed for a specified number of days. The default is 30. You can configure this value in the appSettings file's ExpiredCartJobDays property.

You can also control the name of cart to be excluded from removal via the appSetting episerver:ExpiredCartsRemovalJobExcludedCartName. The default value is "Wishlist".

Full search index

Performs a full indexing of content in product catalogs.

Incremental search index

Performs an incremental indexing of content in product catalogs.

Draft store migration

Used for migration of previously published content versions, when upgrading to the version management introduced with Commerce 9. See Episerver World for technical details.

Find catalog URI conflicts

Analyzes the database to find entries and categories that have the same Name in URL under the same parent category. If conflicts are found, they are logged as warnings, output to the Scheduled Job Log, and sent to email addresses specified in the episerver:commerce.UriSegmentConflictsEmailRecipients AppSetting. For details, see URL segment and SEO URL.

Shipment releasing

Searches for releasable shipmentCommerce: a collection of products from a purchase order, ready to be shipped after going through inventory check and other verifications.s in active orders. If the difference between the shipment creation time and the current time is greater than the configured time span, the order's shipment status is changed to Released.

By default, this job is not active. If the job is active, order shipments are released one day after an order is placed by default. A developer can change the default value in the <Siteroot>/Configs/ecf.order.config file by editing the shipmentAutoReleaseTimeout element.

Rotate encryption keys

Sensitive customer data is secured with encryption keys that are set in meta-fields. This job rotates the encryption keys used by the system. See Episerver World for technical details.

Export product feed

Exports your product feedA file made of all products a client sells. Each product contains an image link, title, identifier, URL, price, currency, and optional attributes. (catalog) to Episerver Product Recommendations to provide accurate and valuable recommendations.

Export product feed incrementally

Exports your product feed (catalog) to Episerver Product Recommendations incrementally. This job keeps Episerver Personalization up-to-date with product changes without exporting the entire catalog.

Because this job only exports added/updated products, it provides better performance and is faster than the Full Export Catalog Feed job. So, it can be run more frequently. But, the incremental job does not replace the Full Export Catalog Feed job because it excludes the deletion of products and edits to asset and inventory information.

Maintain database indexes

To reduce fragmentation in the CMS and Commerce database indexes, this job rebuilds or reorganizes them. You can run the job manually any time that you notice a degradation in performance. Or, you can schedule it to run at regular intervals.

Run this job at times of low usage if possible.

Further, you can set the following parameters to launch the job automatically when specified fragmentation levels are met.

When the job is launched (manually or automatically), it rebuilds or reorganizes depending on the current fragmentation percentage.

Parameter Description Default
To change default

If the avg_fragmentation_in_percent of an index is larger than this value, the index is rebuilt.

30% Add a setting to the web.config's appSettings section using the key episerver::HighFragmentationThreshold.
LowFragmentationThreshold If the avg_fragmentation_in_percent of an index is larger than this value, and smaller than or equal to HighFragmentationThreshold value, the index is reorganized. 10% Add a setting to the web.config's appSettings section using the key episerver::LowFragmentationThreshold.
DataBaseIndicesJobCommandTimeOut The maximum number of seconds for which you want the job to run. If the job does not finish within that time, an exception is generated. 30 seconds Add a setting to the web.config’s appSettings section using the key episerver::DataBaseIndicesJobCommandTimeOut. Within this appsetting setting, set the value to the maximum number of seconds for which you want the job to run.

Export product data to Episerver Campaign

This job collects product data and saves it to a .csv file for transfer to Episerver Campaign. For more details about this process, see Commerce-Campaign integration.

Collect report data

This job compiles the data used in the Sales By Day report (Beta).

Remove old Service API uploaded files and directories

This job is only available after installing the Service API.

This job removes temporary uploaded files and directories that are older than a number of configured days.

The configuration setting is web.config file > appSettings > episerver:serviceapi:uploadRetentionPeriod. If there is no configuration value, the default is 30 days.

Background: Developers can use the Service API to import large files, such as Commerce catalogs. The Service API provides a method for deleting uploaded files that are no longer needed. Use this scheduled job to clean up obsolete files in case a developer overlooks the Delete chunk uploaded method.

Collect orders per promotion statistics

Background information

The Marketing screen displays all campaignsCommerce: a set of related components and activities used for promotions. A campaign organizes marketing activity and is associated with discounts (promotions), customer segments, and markets.. For each campaign, the screen displays

  • its discounts
  • the number of orders that use each discount
  • the total number of orders that include discounts

The scheduled job Collect Orders Per Promotion Statistics reworks the collection of these statistics to improve performance.

Using the scheduled job

To migrate your promotions system to the new optimization, run the Commerce scheduled job, Collect Orders Per Promotion Statistics. If campaigns have too many orders, you may get a timeout exception when running the job. If you do, add an appSettings key named episerver:commerce.OrderPerPromotionReportDataTimeout, and set the timeout in seconds.

By default, this optimization ignores inactive and expired campaigns and promotions (although they are migrated along with active campaigns and promotions). If you want to force the refreshing of their data, add an appSettings key named episerver:commerce.ReportForInactivePromotionItems and set it to true.