You are here:
Configure Scheduling of Recurring Jobs and Volunteers
Automatic scheduling of Jobs and volunteers into the future saves a ton of repetitive data entry.
Say you have 10 volunteer slots for meal delivery every day, from 9 a.m. to 3 p.m., in two 3-hour Shifts. You have a set of volunteers who reliably fill those Shifts. Set up the Volunteers for Salesforce batch job to run periodically and automatically create recurring Shifts and assign recurring volunteers to them.
- Set Up Automatic Creation of Recurring Shifts and Volunteers
Use batch jobs to automatically create records for you, including those that track shifts and volunteers. - Control How Far in the Future to Schedule Shifts
Out-of-the-box, the Volunteers for Salesforce batch job schedules recurring Jobs—and assigns recurring volunteers to them—four months into the future. Adjust this timeframe as needed. - Manually Run Batch Processing of Recurring Jobs and Volunteers
The scheduled recurrence batch job runs automatically after you've scheduled it. If you want scheduled recurrences processed at other times, between scheduled runs, you can start the process manually.
Set Up Automatic Creation of Recurring Shifts and Volunteers
Use batch jobs to automatically create records for you, including those that track shifts and volunteers.
V4S comes with a batch job that you can run on a set schedule. For example, set up the batch job to run once a week and automatically create Shift records for any active Job Recurrence Schedules, and assign any recurring volunteers to those shifts. Each time the batch runs, it generates new records for a few months out (or for whatever time period you've specified in the Recurring Job Future Months custom setting) and updates existing records to reflect changes in event scheduling or volunteer availability.
- From Setup, enter Apex in the Quick Find box, then select Apex Classes.
- Click Schedule Apex.
- Give the job a name, such as Schedule Recurrences.
-
For Apex Class, search for and select
VOL_BATCH_Recurrence.

- Specify the job frequency, such as Sundays at 1 a.m.
- Set an end date well into the future.
- Save your changes.
Now the batch job runs automatically on this schedule, creating recurring shifts and volunteers for active Job Recurrence Schedules.
Control How Far in the Future to Schedule Shifts
Out-of-the-box, the Volunteers for Salesforce batch job schedules recurring Jobs—and assigns recurring volunteers to them—four months into the future. Adjust this timeframe as needed.
Keep in mind that the more months you schedule out, the more data needs to be crunched when the scheduling batch job runs. Salesforce sets limits on how much processing power your batch jobs can consume, so keep it to a reasonable number.
For limits information, see Apex Governor Limits in the Salesforce Developer Documentation.
- From Setup, enter Custom Settings in the Quick Find box, then select Custom Settings.
- Next to Volunteers Settings, click Manage.
- Click Edit. If there are no Custom Settings values configured, click New.
- Update the value of the Recurring Job Future Months field to the desired number of months.
- Save your changes.
Now, every time the batch job runs (according to the frequency you specified when creating the batch job), it processes data for your chosen time period.
Manually Run Batch Processing of Recurring Jobs and Volunteers
The scheduled recurrence batch job runs automatically after you've scheduled it. If you want scheduled recurrences processed at other times, between scheduled runs, you can start the process manually.
-
Click the App
Launcher
(
).
- Find and then click Process Recurrence Schedules.
-
Click Run Batch.
The page confirms when processing is finished.

Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Please enter a valid URL: [External_Signup_Url__c],. This error occurs if your External Signup Url fields on the Volunteer Job object don't start with http, https, or mailto. To resolve this issue, fix the problematic External Signup Url values and then run the batch. Alternatively, you can temporarily deactivate the ValidateExternalSignupUrl validation rule on the Volunteer Job object and run the batch, but be sure to activate the validation rule once you're finished.
