Scheduled Jobs

Pinion ships several Batchable / Schedulable jobs. Some self-seed; others you schedule yourself. This page is the map.

Self-seeding jobs

These are set up for you and generally need no attention.

  • Approval escalation (ApprovalEscalationScheduler + ApprovalEscalationBatch). A self-rescheduling, single-fire cron named Pinion Approval Escalation. It isn’t a fixed cadence — it reschedules itself to fire once at the next pending-approval SLA deadline, re-seeded by the ApprovalRequest__c trigger on submit and by its own finish(). It expires overdue Pending requests and routes them to the escalation approver. (To opt a rule out of escalation, blank its SLA Hours rather than aborting the job.)
  • SyncKey backfill (SyncKeyBackfillBatch). Kicked off by the post-install handler to stamp SyncKey__c on any pre-existing config-promotion records. Idempotent (WHERE SyncKey__c = null) and re-runnable.

Jobs you schedule yourself

These define a job name and cron but are not auto-scheduled on install — a managed-package install runs as a context that can’t create cron triggers. If your org uses them, schedule them once (via System.schedule or the setup apex).

  • Auto renewal (AutoRenewalScheduler). Job name Pinion Auto Renewal, cron 0 0 0 * * ? (midnight daily). Finds contracts inside their auto-renew lead window and creates renewal opportunities via RenewalService.
  • Contract expiration (ContractExpirationBatch). Job name Pinion Contract Expiration, cron 0 0 0 * * ? (midnight daily). Flips a contract’s Lifecycle__c from Active to Expired once it has ended.

Post-install behavior

The packaged post-install handler runs on every install and upgrade. It kicks off the SyncKey backfill and makes a best-effort attempt to re-seed the escalation schedule. Feature-tier and license-ordering defaults are compiled into the package, so there are no custom-metadata seed steps to run.