While I am trying to deploy a Change set, I couldn't find an Apex Scheduled Job(component) that contains a job which was scheduled to run once every week. How to get that scheduled job configuration deployed from a Sandbox to the Production without the need of re-configuring it on the Prod org.?

1 Answer 1


You do have to manually reconfigure the job. You can query the CronTrigger table to get a copy of the CronExpression, if that helps you. Usually, what most developers do is create a static method that helps configure such jobs in the future, like this:


The method for which typically looks like:

public static void schedule() {
  System.schedule('JobName','0 0 0 * * SUN', new SomeScheduledClass());

This leaves administrators/deployment admins with just running a single line of code. This is process that we follow, and it has worked quite well for the past three years to minimize the amount of code our deployment admins needs to learn while making sure things get turned on correctly.

You can also schedule jobs via UI, but if you do this, remember to document it so that the job can be renewed. There are limits to how many times you can request your scheduled job to repeat, unlike the code-based version, which allows your job to run indefinitely without renewing the job's configuration.

  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Adrian Larson
    Aug 20, 2018 at 18:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .