Three categories of "do something at a specific moment", each with different mechanisms.
Immediate actions — fire as part of the saving transaction. Triggers, Validation Rules, Before-Save Flows, After-Save Flows. User sees effect on same UI render.
Time-based actions — scheduled to fire at a future time relative to the record state (e.g., "7 days after Close Date"). Bound to record lifecycle.
- Workflow Time-Based Actions (legacy) — defined in a Workflow Rule. Fire in a queue.
- Scheduled Paths in Record-Triggered Flows (modern) — defined within the flow. Action fires at the scheduled point.
- Approval Process re-evaluation — after time delay.
Time-based items sit in the time-based workflow queue (Setup -> Monitor -> Time-Based Workflow). Tied to record state; if criteria no longer hold, items are removed.
Scheduled Apex / Schedulable — fire at a fixed cron-style time, independent of record lifecycle.
apex public class WeeklyJob implements Schedulable { public void execute(SchedulableContext ctx) { ... } } String cron = '0 0 2 ? * MON'; System.schedule('Weekly Cleanup', cron, new WeeklyJob());
Scheduled Flows — declarative analogue. Configure schedule and optional record query.
Decision: fire on save = Trigger/Flow; X days after record event = Scheduled Path; fixed cron = Schedulable Apex or Scheduled Flow; after time elapses on record = Time-Based Workflow or Scheduled Path; after Approval = Final Approval Action.
Gotchas: time-based queue items can be silently lost if record is deleted or flow definition changes; Scheduled Apex can't be paused (only deleted/recreated); time zones in cron strings are in Salesforce default time zone.
