Scheduling a Job to Run Process Schedules

When you schedule an automation configuration, a process schedule record is created. If the process schedule is active, the Next Due field shows the date and time when it is next due to be run. In order for process schedules to be run, the scheduled job must have been configured. You can configure the scheduled job via the Foundations Setup page or via the API.

For example, if you configure an active process schedule to run at 22:00 today, its Next Due date will update accordingly. If you configure the scheduled job to run at 20:00 each day, the process schedules that are due will not run until the scheduled job picks them up at 20:00 tomorrow. We recommend that you configure the scheduled job to run regularly to avoid significant delays between process schedules being due to run and being picked up by the scheduled job.

When a process schedule runs, a log is created. The log's status will indicate if the process schedule ran successfully, was skipped, or failed with an error. When a process schedule is skipped, its Next Due date is recalculated. The schedule is skipped in the following scenarios:

  • If multiple process schedules are due to run for a single automation configuration, only the oldest process schedule is run. The other schedules are skipped because they are effectively duplicates. This can happen if the scheduled job was not called when the process schedule was previously due to run.
  • If a process schedule is due to run, but the automation configuration's Last Run Date field shows that it has been run more recently than the process schedule's Next Due date, the process schedule is skipped. This can happen if you manually run the automation configuration.

When an automation configuration runs, you can monitor the processes that are currently running by selecting the Active RM Background Processes list view on the Revenue Management Background Processes tab.

Via the Foundations Setup page

Execute RM Process Schedules is a Foundations scheduled job that allows you to specify when you want the due process schedules to run. It can be configured from the Scheduled Jobs tab of the Foundations Setup page. For more information, see Configuring a Scheduled Job.

Via the API (ProcessScheduleService)

The ProcessScheduleService is a global API that allows you to configure the scheduled job to run process schedules. The runDueSchedules method will run any process schedule that has a Next Due date in the past.

For more information about using the ProcessScheduleService, see the Revenue Management API Developer Reference which is listed in Permission Sets and Other Technical Documentation.

Supported Volumes

The Process Schedule Volume Limit field in the Revenue Management Settings custom setting controls the maximum number of process schedules that can be picked up in a single run. The default value of 15 is the maximum allowed volume limit. You can decrease this limit. If you increase it to a value greater than 15, it will still be treated as 15. For more information, see the Process Schedule Volume Limit field description in Revenue Management Settings.

If the number of due process schedules exceeds the volume limit, the process schedules with the oldest Next Due date will be run while any remaining schedules will be processed the next time the service is called. For example, using the default volume limit of 15, if 20 process schedules are all due to run, the 15 process schedules with the oldest Next Due date will be run when the scheduled job next runs. The remaining five process schedules will not run and their Next Due date will stay the same. They will therefore become the oldest process schedules that need running and will be processed the next time the scheduled job executes. If you do not want to wait for the scheduled job to execute again, you can configure it to run more often.

The exact number of supported process schedules varies depending on whether any customizations are implemented in your org, the size and complexity of your automation configurations, and platform limits. If you regularly exceed the maximum number of process schedules that can be picked up by the scheduled job, try configuring the scheduled job to run more often. If you encounter platform limits, try reducing the Process Schedule Volume Limit. This will mean that fewer process schedules are picked up when the scheduled job runs so you might need to configure it to run more often.