How to Schedule Delayed Automation Triggers

Quick answer On a workflow definition, set Trigger delay (minutes) so matching starts only after a durable ScheduledAutomationEvent wait — not an immediate Hangfire Schedule on the worker. Optionally set Cancel on event type to clear the wait when a superseding event fires for the same entity. Hangfire job automation-due-delays polls due rows about every 5 minutes. Labour shift-swap uses this for +24h escalation cancelled on approve/reject.
Automation admin setting Trigger Delay minutes on a Biznsbook workflow definition
How to Schedule Delayed Automation Triggers — ScheduledAutomationEvent, TriggerDelayMinutes, CancelOnEventType, automation-due-delays job in Biznsbook.

Escalations fire too early or never cancel after resolution

Teams want “if still open after 24 hours, escalate” but fire Hangfire schedules that keep running after someone already approved the request.

In-workflow Delay actions alone cannot delay the start of matching after the original domain event.

Daily scanners miss same-day SLA windows and create noisy duplicate escalations.

Why this happens

  • Using only immediate Hangfire Schedule without a durable cancelable row.
  • No Cancel on event type when a superseding domain event should abort the wait.
  • Assuming mid-workflow Delay replaces trigger-level delay.
  • Ignoring the 5-minute due-delays poll cadence when testing.

Biznsbook addresses this through ScheduledAutomationEvent, TriggerDelayMinutes, CancelOnEventType, automation-due-delays job when Business Automation is licensed — ScheduledAutomationEvent waits, Hangfire automation-due-delays, and CancelOnEventType keep escalations honest.

Finance teams lose days each month reconciling versions that should never have diverged. Naming Biznsbook screens as the system of record — and closing periods when agreed — prevents silent edits that auditors flag immediately.

Step-by-step: Schedule Delayed Automation Triggers

Built for operations leads wiring durable trigger delays and cancel-on-event patterns across Biznsbook Automation — including the Labour shift-swap escalation pilot.

  1. License Business Automation. Ensure Automation is available and you can edit workflow definitions.
  2. Open the workflow. Create or edit a workflow that listens to the trigger event you care about.
  3. Set Trigger delay (minutes). Enter the wait after the trigger event before the workflow should start. Rows persist as ScheduledAutomationEvent.
  4. Set Cancel on event type (optional). Enter the superseding event type that should cancel pending schedules for the same entity (wired through WorkflowDispatcher).
  5. Activate and publish a test event. Publish a matching domain event; confirm a scheduled row exists instead of an immediate run.
  6. Wait for automation-due-delays. Hangfire job automation-due-delays runs about every 5 minutes and fires due rows.
  7. Verify cancel path. Publish the cancel event before due time and confirm the schedule is cleared — as Labour swap does on approve/reject before +24h escalation.

Review results after the first full weekly cycle. Adjust roles, mappings, or approvals where the same exception repeats.

Screen-level flows live in the Help Center. This guide focuses on the business process; help articles cover click-by-click navigation.

Common mistakes to avoid

  • Mistake 1: Using only immediate Hangfire Schedule without a durable cancelable row. Repeating this each month usually shows up first in escalations after resolution or missed SLA waits.
  • Mistake 2: No Cancel on event type when a superseding domain event should abort the wait. Repeating this each month usually shows up first in escalations after resolution or missed SLA waits.
  • Mistake 3: Assuming mid-workflow Delay replaces trigger-level delay. Repeating this each month usually shows up first in escalations after resolution or missed SLA waits.
  • Mistake 4: Ignoring the 5-minute due-delays poll cadence when testing. Repeating this each month usually shows up first in escalations after resolution or missed SLA waits.

Track recurring exceptions in month-end notes; each should map to a control above.

Best practices that hold up as you scale

  • License Business Automation — Ensure Automation is available and you can edit workflow definitions.
  • Open the workflow — Create or edit a workflow that listens to the trigger event you care about.
  • Set Trigger delay (minutes) — Enter the wait after the trigger event before the workflow should start.
  • Set Cancel on event type (optional) — Enter the superseding event type that should cancel pending schedules for the same entity (wired through WorkflowDispatcher).
  • Activate and publish a test event — Publish a matching domain event; confirm a scheduled row exists instead of an immediate run.

Teams that pair every Trigger delay with Cancel on event type and test one cancel path before go-live avoid orphan escalations.

How Biznsbook supports this workflow

ScheduledAutomationEvent is documented in Biznsbook Business Automation capabilities. Use it as part of a controlled finance process — posting, review, and period close — not as an isolated export. When Sales, Purchase, Inventory, Taxation, Expense, or Finance Management modules are enabled, related documents can post through the central accounting posting service with double-entry validation.

TriggerDelayMinutes is documented in Biznsbook Business Automation capabilities. Use it as part of a controlled finance process — posting, review, and period close — not as an isolated export. When Sales, Purchase, Inventory, Taxation, Expense, or Finance Management modules are enabled, related documents can post through the central accounting posting service with double-entry validation.

CancelOnEventType is documented in Biznsbook Business Automation capabilities. Use it as part of a controlled finance process — posting, review, and period close — not as an isolated export. When Sales, Purchase, Inventory, Taxation, Expense, or Finance Management modules are enabled, related documents can post through the central accounting posting service with double-entry validation.

automation-due-delays job is documented in Biznsbook Business Automation capabilities. Use it as part of a controlled finance process — posting, review, and period close — not as an isolated export. When Sales, Purchase, Inventory, Taxation, Expense, or Finance Management modules are enabled, related documents can post through the central accounting posting service with double-entry validation.

Workflow edit and activate permissions stay admin-gated; modules may also call IAutomationDelayScheduler directly.

Suggested implementation timeline

  1. Week 1: Document current process gaps and configure ScheduledAutomationEvent with finance owner sign-off.
  2. Weeks 2–3: Pilot on one month or one entity; post all test transactions through Biznsbook; freeze parallel spreadsheet journals.
  3. Week 4: Run first trial balance or report tie-out; fix mapping and permission issues.
  4. Month 2–3: Roll out to full team; add approvals and period close cadence from this guide.
  5. Ongoing: Monthly review using design tip and leadership dashboard.

Trigger delay versus mid-workflow Delay

TriggerDelayMinutes creates a durable ScheduledAutomationEvent after the domain event so the workflow has not started yet. Mid-workflow Delay / Waiting pauses an instance that already matched and is executing actions — with Delay action max of 30 days.

Choose trigger delay for “still open after N minutes/hours” SLAs. Choose mid-workflow Delay when steps inside an already-running flow must wait (for example after an approval branch).

CancelOnEventType pattern

When a human or system can resolve the case early, set Cancel on event type to the superseding event. WorkflowDispatcher cancels pending schedules for the same entity so escalate actions never fire after resolution.

Labour shift-swap is the pilot: schedule labour.swap.escalated +24 hours, cancel on approve or reject. Copy that pattern for credit holds, quality fails, and lead follow-ups that should stop when the next state event arrives.

Hangfire and testing cadence

Job automation-due-delays polls due ScheduledAutomationEvent rows about every five minutes. When testing a five-minute delay, allow at least one poll cycle plus clock skew before declaring failure.

Modules can also call IAutomationDelayScheduler directly when a workflow definition is not the right place — still prefer CancelOnEventType semantics so durable rows do not orphan after resolution.

Keep Delay action limits in mind for mid-flow waits (max 30 days). Trigger-level delays for multi-day SLAs should still define a cancel event so long waits do not fire after the case closed yesterday.

Document the event pair in the workflow description: trigger event, delay minutes, cancel event, and expected action. That note becomes the runbook when operators ask why an escalation did or did not fire.

Metrics to track monthly

  • Workflows with TriggerDelayMinutes and CancelOnEventType
  • Pending ScheduledAutomationEvent rows cleared on resolve
  • Labour swap escalate cancelled on approve/reject
  • automation-due-delays success without dead-letter spikes
  • Documented cancel test in go-live checklist

Start with three metrics; trend direction matters more than a single point-in-time snapshot.

Spreadsheet / manual books vs integrated ERP

Compare typical manual finance work with Biznsbook ScheduledAutomationEvent and related capabilities.

CapabilityManual / SpreadsheetBiznsbook
Start delay❌ Immediate match only✅ TriggerDelayMinutes wait
Durability❌ In-memory Hangfire schedule✅ ScheduledAutomationEvent row
Cancel❌ Manual job delete✅ CancelOnEventType
Poll cadence❌ Guess when it fires✅ automation-due-delays ~5 min
Labour pilot❌ Daily scan only✅ +24h escalate, cancel on resolve
Mid-flow Delay❌ Confused with trigger delay✅ Both supported; different jobs

Design tip

Pair every Trigger delay with a Cancel on event type whenever a human or system can resolve the case early. The Labour swap pilot is the reference pattern. Log one successful cancel test in your go-live checklist before enabling production escalations — fire without cancel is worse than no automation.

Document this in your finance SOP and revisit each quarter as transaction volume or entity structure changes.

Frequently asked questions

Is trigger delay the same as the Delay action?

No. Trigger delay waits before the workflow starts. Mid-workflow Delay / Waiting pauses an already running instance (max 30 days for Delay actions).

How often are due delays processed?

Hangfire job automation-due-delays runs about every 5 minutes.

What is the Labour pilot?

Shift-swap requests schedule labour.swap.escalated +24 hours and cancel that schedule when the swap is approved or rejected.

Can modules schedule delays in code?

Yes. Modules can call IAutomationDelayScheduler directly in addition to workflow TriggerDelayMinutes.

Where is the due-delays job documented?

Hangfire docs list automation-due-delays on a */5 cron under Business Automation.

Should I use a daily scanner instead?

Prefer ScheduledAutomationEvent for same-day or 24-hour SLAs. Daily scanners miss intra-day windows and often duplicate escalations.

How this differs by industry

Retail

Retail ops delay low-stock purchase workflows a few hours so overnight replenishment can clear before escalation.

Wholesale & distribution

Distributors cancel delayed credit-hold workflows when a payment-received event arrives for the same invoice.

Manufacturing

Plants delay quality escalation after a fail event so rework can complete before notifying plant managers.