You are here:
Schedule Apex Jobs
Use the Apex scheduler and the Schedulable
interface if you have specific Apex classes that you want to run on a regular basis, or to run a
batch Apex job using the Salesforce user interface.
Required Editions
| Available in: Salesforce Classic (not available in all orgs) and Lightning Experience |
| Available in: Enterprise, Performance, Unlimited, Developer, and Database.com Editions |
The scheduler runs as system—all classes are executed, whether or not the user has permission to execute the class.
You can only have 100 active or scheduled jobs concurrently. Implement the Schedulable interface in an Apex class that
instantiates the class you want to run.
- From Setup, enter Apex Classes in the Quick Find box, select Apex Classes, and then click Schedule Apex.
- Specify the name of a class that you want to schedule.
- Select Schedule Builder or Cron Expression to schedule an Apex job.
-
If you select Schedule Builder:
-
Specify how often the Apex class is to run.
- For Weekly—specify one or more days of the week the job is to run (such as Monday and Wednesday).
- For Monthly—specify either the date the job is to run or the day (such as the second Saturday of every month.)
- Specify the start and end dates for the Apex scheduled class. If you specify a single day, the job only runs once.
- Specify a preferred start time. The exact time the job starts depends on service availability.
-
Specify how often the Apex class is to run.
- If you select Cron Expression, specify the time using the cron expression and schedule the class to run at the configured time.
- Click Save.
Alternatively, you can call the System.scheduleBatch method to schedule the batch job to run once at a future
time. For more details, see “Using the System.scheduleBatch Method” in the Apex Developer Guide.
After you schedule an Apex job, you can reschedule, pause or resume, or delete the job. You can monitor the progress of the job on the All Scheduled Jobs page.
After the job has been completed, you can see specifics about the job, such as whether it passed or failed, how long it took to process, the number of records processed on the Apex Jobs page.

