This article will give you a quick primer on how to schedule a job. Causeview offers a number of jobs that carry out tasks on a regular basis. Jobs can be scheduled to run automatically on a daily, weekly, or monthly basis. Jobs can be completely customized to run on a specific day, and at a specific time. This is important for when you are scheduling multiple jobs, as some jobs can conflict with one another.
For scheduling jobs you will need access to Setup and know the name of the Apex class to schedule for the job you want to run.
Jobs can be scheduled to run automatically on a daily, weekly, or monthly basis.
Jobs can be completely customized to run on a specific day, and at a specific time.
This is important for when you are scheduling multiple jobs, as some jobs can conflict with one another.
To Schedule a Job:
1. Go to Setup -> Apex Classes -> Schedule Apex

This is the Schedule Apex page
2. Here you will enter a unique and descriptive Job Name. Keep in mind that this is the name that will display in the Scheduled Jobs section. (Setup -> Scheduled Jobs)
3. Select the Apex Class the job will be running. You want to select the Scheduler class for the job you are trying to run. For example: If scheduling the Account Rollup Job, you would set the Apex Class to 'RollupBatchForOrganizationScheduler'.
4. Set the Frequency, Start and End Date, and Preferred Start Time.
Frequency can be set to Weekly or Monthly.
If you choose Weekly, it allows you to choose which day(s) of the week you would like the job to run. You can choose to run it once a week, multiple times a week, or even every day.
If you choose Monthly, you have the option to either select the numeric day you wish it to run every month, or the day of the week you would like it to run every month.
Start Date is the date you want the job to start running. This field by default is set to today.
End Date is the date you want the job to stop running. This field by default is set to tomorrow, however we recommend putting this date well in the future as the job will no longer run after this date.
Preferred Start Time is the actual time you would like the job to run. Jobs can be Scheduled to start at any time. It is important to note that some jobs can interfere with one another. You can use start times to avoid scheduling conflicting jobs at the same time.
To see your job once it has been scheduled as well as a full list of scheduled jobs within your org, you can go to Setup -> Scheduled Jobs
*Scheduled Jobs is also where you are able to manage and delete existing scheduled jobs.
-----
To learn more about scheduling, see this Trailhead https://trailhead.salesforce.com/en/content/learn/modules/asynchronous_apex/async_apex_scheduled
Comments
0 comments
Please sign in to leave a comment.