OptionalheartbeatHeartbeat the running job's lease (GH #2749). Calling this signals that
the plugin is still making forward progress, pushing the lock's
ExpectedCompletionAt further into the future so the scheduling engine's
sweep does not reclaim this job's concurrency slot.
Contract:
heartbeat falls back to today's
fixed acquire-time lease behavior — nothing breaks.void context.heartbeat?.()).ConcurrencyMode='Concurrent' there is no lock to extend, so this does
nothing.The engine ALWAYS supplies this when it runs a job, so inside Execute
plugins may call context.heartbeat!() directly. The ? only covers
ScheduledJobExecutionContext literals built by hand (e.g. unit tests).
IMPORTANT: renewal MUST be driven by the plugin's own forward progress —
the engine deliberately does NOT auto-heartbeat at await boundaries,
because an auto-beat would keep renewing the lease while a plugin is
wedged in await something(), masking exactly the hang we want to detect.
Context passed to job execution