Sync Scheduler
The Sync scheduler is a combination of an Apex scheduled and batch jobs. The scheduled job must be running for candidates to be synced with Daxtra.
Starting the scheduler
The scheduler is managed via a schedulable piece of Apex code. The scheduler manages the syncing of candidates and is responsible for:
- Creation of index batch jobs
- Governing the number of index batch jobs that can run at any one time (1)
- Reducing the CRON time down to a 5 minute interval
The scheduler can be started by executing the following anonymous Apex code via the developer console:
seven20.DaxtraCandidateSearchSyncerScheduler.scheduleJob();
For more information on using the developer console, please refer to the Salesforce guidance here. To stop the scheduler, you can utilise Salesforce's own functionality.
Do not run the scheduler within a Sandbox or when doing test data loads
One off sync
In scenarios where a large number of candidates need to be synced, it is best to abort the scheduler and instead perform a one off sync run after all records have been imported. This can be done by running the following Apex code:
seven20.DaxtraCandidateSearchSyncerScheduler.runOneOffJob();
The one off job can be used within Sandboxes, but only when there is a small number of candidates to be synced
Indexing process
When there are candidates to be synced, the batch job chunks through them in batches of 1, or if AWS is enabled, batches of 10. Each chunk is then processed and the record is updated with the outcome of the sync, whether it was successful or not.
In some situations a record may have been synced successfully, but due to validation rules or errors within other automations, the record may not have been updated within Salesforce. In these situations, the record will be re-synced on the next run of the scheduler, for up to 2 days, after which they will be ignored, until the record is modified again.
Records which fail to set their seven20__Daxtra_Id__c field value will not be searchable via the boolean filter, so ensure all records are synced before enforcing validation rules
Considerations
- Indexing of a CV is a resource-intensive process, and as such, the length of time taken to index a large number of records can be lengthy. To help mitigate this, it is best to perform bulk indexing outside of business hours, or preferably on weekends, to avoid impacting users.
- We only consider records which have been modified within the last 2 days for syncing, this is to prevent record save issues from creating an infinitely looping sync process. Take this into account when performing a large sync of records.