iSyncSFDocumentation

#16. Scheduled Background Jobs

iSyncSF includes a set of background jobs that keep the system running smoothly. These scheduled jobs handle OAuth token refresh, metadata cache updates, stale job resumption, and audit log cleanup — all configurable with standard Salesforce CRON expressions.

Purpose: Scheduled jobs handle automated maintenance and operational tasks that keep the application healthy without user intervention. They resume paused sync jobs, refresh OAuth tokens, update metadata caches, and clean up old data to prevent storage overuse. Without these jobs, paused syncs would stay paused, tokens would expire, and data storage would grow indefinitely. Where It Fits: Scheduled jobs are configured during initial setup (Setup Assistant -> Scheduled Jobs tab) and run continuously in the background. They are the "operations layer" of the application. Users typically configure them once and forget about them unless they need to adjust schedules or retention periods.

#16.1 System Jobs

JobSchedulePurpose
Sync Job ManagerEvery hourResumes paused sync jobs (max 5 concurrent)
Metadata Cache RefreshBi-weekly (1st & 15th)Refreshes object relationship metadata cache
OAuth Token RefreshEvery hourRefreshes expiring OAuth tokens for connected orgs

#16.2 Cleanup Jobs

JobScheduleRetentionPurpose
Audit Log CleanupDaily at 2 AM90 daysPurges old sync audit log records
Application Log CleanupDaily at 3 AM60 daysPurges old application log records
Job Record CleanupWeekly Sunday at 4 AM180 daysPurges old sync job records

#16.3 Managing Jobs

What Users Can Do: - Schedule/reschedule any job with a custom CRON expression - Change retention periods for cleanup jobs - Abort running scheduled jobs - Apply recommended default settings with one click - View job status, next fire time, and previous fire time

#Available Scheduled Jobs

iSyncSF includes the following schedulable background jobs:

#CRON Expression Examples

Salesforce CRON expressions use the format: Seconds Minutes Hours Day_of_month Month Day_of_week Optional_year. Common examples:

#Concurrency Limits

Salesforce limits the number of concurrent batch and scheduled jobs. iSyncSF uses sequential job chaining (one batch completes before the next starts) to stay within these limits. If you see errors about exceeding the concurrent batch job limit, check for other packages or custom jobs that may be consuming the available slots, and consider scheduling iSyncSF jobs during off-peak hours.