Scheduled Job Health Monitoring
Overview
Section titled “Overview”Scheduled Job Health Monitoring tracks every scheduled Apex job and recurring batch process in your org. When a submitted-by user goes inactive, or when a job fails three times in a row, OrgGuard creates a finding and routes the alert per the originating policy’s notification settings — before the failure causes a silent data or integration outage.
Scheduled jobs in Salesforce run under the security context of the user who submitted them. If that user is deactivated, frozen, or deleted, the job continues to run but processes no data — and Salesforce surfaces no warning. OrgGuard detects this condition on every scan and raises a finding, routing the alert per the originating policy’s notification settings before damage accumulates.
What you’ll see
Section titled “What you’ll see”The Scheduled Job Health experience is two screens:
- Scheduled Job Inventory — a dashboard and list view of every discovered scheduled job with health metrics, owner status, next fire time, last fire status, and consecutive failure count
- Finding detail — the standard OrgGuard findings view, with job-specific context on why the finding was created
Dashboard metrics
Section titled “Dashboard metrics”The top of the Scheduled Job Inventory shows four metrics cards:
| Card | Description |
|---|---|
| Total Jobs | Count of all scheduled jobs discovered in your org |
| Active | Jobs whose JobStatus__c is Active |
| Failing | Jobs that have exceeded the consecutive failure threshold |
| Error State | Jobs whose JobStatus__c is Error (e.g., missing class) |
Job list view
Section titled “Job list view”Below the metrics, a list shows one row per job with columns for:
| Column | Description |
|---|---|
| Job Name | The name of the scheduled Apex class, Flow, or batch job |
| Status | The job’s JobStatus__c: Active, Paused, Error, or Deleted |
| Apex Class | The fully qualified Apex class name being scheduled |
| Schedule | The cron expression defining when the job runs |
| Next Run | When the job is next scheduled to fire |
| Last Run | The timestamp of the most recent execution |
| Failures | Consecutive failure count since the last successful run |
| Owner | The submitted-by user who owns the job’s run context |
The list has two separate filters: a Status filter (All / Active / Paused / Error / Deleted) and a Failing/Healthy failure filter. A job with consecutive failures over the threshold shows in the Failing failure filter and means OrgGuard has created or will create a finding on the next scan. “Inactive Owner” is a finding type, not a status — find those in the Findings tab.
How OrgGuard detects job health problems
Section titled “How OrgGuard detects job health problems”OrgGuard runs scheduled job discovery as part of every org scan. It queries CronTrigger and AsyncApexJob to build the inventory, then checks two conditions:
Condition 1 — Inactive submitted-by user
If the user who submitted a job (CronTrigger.CreatedById) is inactive, frozen, deleted, or locked, OrgGuard creates an Inactive Owner finding for the job. The job may still execute, but it runs in a degraded context with no user to receive failure notifications.
Condition 2 — Consecutive failures
If a job’s last N executions all have a status of Failed (where N is configurable, default 3), OrgGuard creates a Consecutive Failure finding. A single failure may be transient; three in a row is a pattern.
Both finding types route according to the originating policy’s notification settings (the Inactive Job Owner and Job Failure Threshold policies). When Notify Asset Owner is on, alerts go to the job’s submitted-by user; when Notify Admin Group is on (or when there is no usable owner), alerts go to the admin group. Scheduled jobs have no OrgGuard owner-override.
Common tasks
Section titled “Common tasks”View all jobs with health problems
Section titled “View all jobs with health problems”Who can do this: OrgGuard Admin, OrgGuard User, OrgGuard Auditor
Prerequisites: At least one scan has run since Scheduled Job Health Monitoring was enabled.
- Open the OrgGuard Lightning app and click Scheduled Jobs in the navigation.
- Set the Failing/Healthy failure filter to Failing to surface jobs over the consecutive-failure threshold. Use the Status filter (Active / Paused / Error / Deleted) to narrow further — e.g. Error for jobs in a Salesforce error state.
- Review the filtered list. Jobs in the Failing filter need investigation into why the Apex class or batch is erroring. To find jobs whose submitted-by user has gone inactive, open the Findings tab and look for Inactive Owner findings.
Expected result: A filtered list of jobs requiring attention. If the list is empty, all discovered jobs are within the failure threshold.
Open a scheduled job’s record
Section titled “Open a scheduled job’s record”Who can do this: OrgGuard Admin, OrgGuard User, OrgGuard Auditor
Prerequisites: The job appears in the Scheduled Job Inventory.
- In the job list, open the row’s action menu and click View.
- OrgGuard navigates to the job’s standard Salesforce record page, where you can review its schedule, status, submitted-by user, and failure history.
Remediate a job with an inactive submitted-by user
Section titled “Remediate a job with an inactive submitted-by user”Who can do this: OrgGuard Admin (requires Apex execution permissions in Salesforce)
Prerequisites: The job has an Inactive Owner finding in OrgGuard. The new user is active and has the required permissions to run the job’s Apex class.
Salesforce does not allow updating the submitted-by user on a running job. Remediation requires aborting the job and rescheduling it under the correct user.
Steps:
- From the Scheduled Job Inventory, note the Job ID and the Apex class name (shown in the job detail view).
- Open the Salesforce Developer Console or Execute Anonymous window.
- Abort the existing job:
System.abortJob('YOUR_CRONJOB_ID');
- Reschedule the job under an active user context. For a daily 2 AM schedule:
String jobId = System.schedule('Your Job Name','0 0 2 * * ?',new YourSchedulableClass());
- Return to OrgGuard, trigger a manual scan, and confirm the job inventory shows the new submitted-by user as active.
- Resolve the finding manually or wait for the next scan to auto-resolve it.
Expected result: The rescheduled job appears in the inventory with an active submitted-by user. The Inactive Owner finding is resolved.
Acknowledge a consecutive failure alert
Section titled “Acknowledge a consecutive failure alert”Who can do this: OrgGuard Admin, OrgGuard User
Prerequisites: A Consecutive Failure finding exists for the job.
- Open the Findings tab. Search for the job name to locate its finding. (Known gap: there is no dedicated Scheduled Job finding-type filter — locate the finding by searching for the job name.)
- Review the failure count and the last error message (if available from
AsyncApexJob). - Click Acknowledge and add a resolution note describing the investigation status.
- Resolve the underlying Apex error in the class, then trigger a manual scan.
Expected result: Once the job executes successfully, OrgGuard auto-resolves the finding on the next scan. The consecutive failure count resets to zero.
Failure threshold reference
Section titled “Failure threshold reference”| Setting | Default | Notes |
|---|---|---|
| Consecutive failure threshold | 3 | Configurable per policy |
| Alert deduplication window | 24 hours | Same as CLM alerts |
| Owner routing | Per the policy’s Step-4 toggles: submitted-by user (Notify Asset Owner) and/or admin group | Same notification engine as Certificate Lifecycle Management |
Troubleshooting
Section titled “Troubleshooting”| Symptom | Likely cause | Fix |
|---|---|---|
| A scheduled job I know exists is not in the inventory | Discovery has not run since the module was enabled, or the job was created after the last scan | Trigger a manual scan from Scan Management |
| Finding created but the submitted-by user is still active | The user was deactivated between the job being submitted and the last scan | OrgGuard detected the deactivation on the most recent scan — the finding is correct |
| Job keeps failing after I rescheduled it | The new user lacks required permissions, or the Apex class has a code-level bug | Check the AsyncApexJob error log in Salesforce; review the class’s required permission sets |
| Findings not routing to the right person | The originating policy’s notification toggles don’t match where you expect alerts | Edit the Inactive Job Owner / Job Failure Threshold policy’s Step 4 — enable Notify Asset Owner and/or Notify Admin Group and set the Admin Group Email |
| I aborted the job but OrgGuard still shows it | Aborted jobs remain in CronTrigger with status DELETED until the next OrgGuard scan clears them | Trigger a manual scan; the job will be removed from the inventory |
Does OrgGuard abort or reschedule jobs automatically? No. Scheduled job remediation requires human judgement — the new owner must have the correct permissions, and the schedule may need adjusting. OrgGuard provides guided instructions but does not execute Apex on your behalf.
Does OrgGuard monitor all scheduled job types?
OrgGuard discovers Apex Class scheduled jobs, Batch Apex, recurring Queueable chains, and Flow schedules that appear in CronTrigger. Jobs that run entirely via Platform Events or external schedulers are not discoverable.
Can I suppress alerts for a job that’s intentionally inactive? Yes — create a Suppression via the finding’s Suppress action. OrgGuard will not alert on that job again unless the suppression expires or is manually removed.
What happens when a job succeeds again after failures? OrgGuard auto-resolves the Consecutive Failure finding on the next scan that detects a successful execution. No manual action is needed.
Will OrgGuard detect newly scheduled jobs automatically?
Yes — every scan re-queries CronTrigger and adds newly discovered jobs to the inventory.
Related
Section titled “Related”- Scheduled Jobs — manage OrgGuard scheduled jobs and understand refresh cadence
- Findings — review and triage scheduled job health findings
- Notifications — configure who receives job failure alerts
- Asset Inventory — unified view of all operational assets including scheduled jobs
- Permission Sets — who can view and manage scheduled job health findings