Scheduling the ProcessExpiredPromotions job

You can use the ProcessExpiredPromotions job to report, delete, archive, or deactivate expired promotions automatically. This job can potentially improve performance of the promotion engine since deleted or archived promotions do not display in the main list of promotions on Management Center.

It is recommended that you schedule this job in the staging environment and use the stageprop utility to propagate the changes to the production environment.

About this task

The ProcessExpiredPromotions scheduler job can be used on a store-wide basis only, and fails if scheduled as a site-level job.
Alternatively, you can run the ProcessExpiredPromotions command through a URL if you are logged in to your store with Site Administrator access.
http://hostname/webapp/wcs/stores/servlet/en/ProcessExpiredPromotions?action=anAction&days=x
Note: If the scheduler job deletes an expired promotion that was modified in a workspace task, then you might notice the following behavior:
  • When the workspace task is approved, if the promotion name was not modified in the workspace task, then a new promotion is created and 11 - 13 numbers are appended to the promotion name. If the entire name becomes too long, then the numbers are preserved and the promotion name might be truncated. These numbers are appended to the name during deletion to reduce the chances of collisions with other promotion names.

Procedure

  1. Open the Administration Console, and select Site on the Administration Console Site/Store Selection page.
  2. Select your store and then click OK.
    The ProcessExpiredPromotions job modifies the promotions for the extended sites store that you chose only. If you want to use the ProcessExpiredPromotions job to handle promotions in the storefront asset store, then you need to select the asset store and create another scheduler job.
  3. Click Configuration > Scheduler . A list of jobs that are scheduled to run is displayed.
  4. Add the ProcessExpiredPromotions job.
    1. Click New.
    2. Select ProcessExpiredPromotions from the Job command menu.
    3. Enter the parameters to use in the Job parameters field.
      Parameter Description
      action The type of action to perform. Valid values are report, deactivate, delete, and archive.
      report
      Prints the names of expired promotions in the SystemOut.log file.
      deactivate
      Deactivates expired promotions.
      delete
      Sets expired promotion as mark for delete.
      archive
      Archives expired promotions.
      days Complete the specified action on promotions that have been expired for at least x days.
      Note: The number must be an integer greater than or equal to 0.
      For example, to deactivate all promotions that have been expired for at least 3 days, enter the following job parameters:
      action=deactivate&days=3
    4. Complete all other necessary fields and then click OK. Save.

Results

Your job is listed on the Scheduler Status Display page and runs at the specified start time.