Pause and resume rules
POST /api/v1/rules/:id/toggle flips paused ↔ active. Circuit-breaker-paused rules carry auto_pause_reason — review last_error before resume. Paused keeps history.
Written By Salvatore Sinigaglia
Last updated About 1 hour ago
POST /api/v1/rules/:id/toggle flips paused ↔ active. Circuit-breaker-paused rules carry auto_pause_reason — review last_error before resume. Paused keeps history.
Pause and resume rules
Per-rule toggle:
POST /api/v1/rules/:id/toggleflips betweenpausedandactive. Or use the rule's action menu → Pause / Resume. When the circuit breaker trips it sets the rule back topaused(there is no separateerrorstatus) and recordsauto_pause_reason— reviewlast_errorbefore resuming. Paused rules keep all history.
Who is this for
Anyone managing rules day-to-day. Common during creative refreshes, holiday closures, post-incident debugging.
The two statuses
There is no separate error status — a circuit-breaker trip simply returns the rule to paused and records auto_pause_reason + last_error.
Per-rule toggle
From the rule list
/rules → row actions menu → Pause / Resume.
From the rule detail
/rules/:id → top toolbar → Pause / Resume.
Via API
POST /api/v1/rules/:id/toggle flips current status:
paused→activeactive→paused
Returns the updated rule. A rule the circuit breaker paused is just paused, so toggling resumes it to active — but review last_error first (see Recovery below), or it re-trips.
What happens on pause
status→paused- No further cron evaluations
- In-flight executions complete (no cancel)
- Execution history preserved
- Notifications stop (notify_on_execution only fires on action)
last_evaluated_atpreserved
What happens on resume
status→active- Next cron tick (within 15 min) evaluates the rule
last_evaluated_atchecked normally — if rule was paused for hours, it resumes at next cycle (not catching up)- Cooldowns: per-entity cooldowns from the past still apply if still within window
Recovery after a circuit-breaker auto-pause
When a rule auto-pauses via the circuit breaker (status set back to paused, auto_pause_reason recorded — see rul-108):
Step 1: Review last_error
/rules/:id shows last_error (last error message that contributed to circuit-breaker trip) and auto_pause_reason.
Common errors:
platform_token_expired— ad account token revoked / expiredplatform_api_error: ...— upstream API issue (transient or permanent)validation_error: budget below minimum— action params became invalidnetwork_error— transient infrastructure
Step 2: Fix the root cause
Per error:
- Token issues → re-authorize the ad account (
/connect/{platform}) - Permanent API issues (e.g. platform deprecated an endpoint) → update the rule's action / metric
- Budget validation → adjust the rule's
pctvalue or scope - Transient → wait, then retry
Step 3: Resume
Manual toggle: /rules/:id → Resume. Sets status: active and clears auto_pause_reason.
If you resume without fixing: the rule will re-trip the circuit breaker within hours.
Step 4: Monitor first 24h
Watch execution history. If errors persist and the circuit breaker re-pauses the rule: re-investigate before resuming again.
cb_reset_after — automatic resume eligibility
When the circuit breaker trips, cb_reset_after is set to a future timestamp. After this time, the rule may auto-resume on the next cron tick if error rate is no longer above threshold.
For most cases: don't rely on auto-resume. Fix the cause + manually resume earlier.
Use cases
Creative refresh week
Active campaigns are being rebuilt; many entities will be paused / archived. Pause the kill-loser rules to avoid acting on the temporary state. Resume after rebuild.
Time-bound campaign window
Holiday-only rule (e.g. "Black Friday spend cap"): pause outside the window, resume in early November, pause in early December.
Hand-over to colleague
Pause rules you maintained, until handover meeting + new owner reviews + resumes.
Post-incident audit
After an incident: pause all rules → analyze execution history → identify which rule caused the issue → fix that one → resume others.
Pausing many rules
There is no bulk pause/resume — pause or resume each rule with its own toggle. The only bulk operations are Duplicate and Delete (see bulk actions).
Audit log
Each manual toggle writes an entry:
action: rule.toggle(dot-notation)metadatacapturing the status change
Visible in the audit log at /api/v1/audit-log.
Common mistakes
- Resuming a circuit-breaker-paused rule without fixing the cause: re-trips within hours (check
auto_pause_reason/last_errorfirst) - Pausing instead of editing: if a rule is wrong, pause is temporary; edit + activate is the fix
- Forgetting paused rules: they're invisible to "what's running" mental model. Periodically review
/rules?status=pausedand decide: resume or delete. - Expecting paused rules to "catch up" on resume: they don't — resume picks up at next cron tick, no replay
FAQ
How do I pause or resume a single rule in Wevion?
Use the per-rule toggle in Wevion: the /rules row actions menu, the /rules/:id detail toolbar, or the API call POST /api/v1/rules/:id/toggle, which flips paused to active and back. A paused rule won't be evaluated by cron, while an active rule runs at its scheduled cadence.
Do paused rules lose their execution history?
No. When you pause a rule in Wevion, its execution history is preserved, last_evaluated_at is kept, and in-flight executions complete without cancellation. Only future cron evaluations stop. Notifications also stop because notify_on_execution only fires when an action runs.
My rule was auto-paused — how do I resume it safely?
When the circuit breaker trips after repeated failures, Wevion sets the rule back to paused (there is no separate error status) and records auto_pause_reason. You can resume it with the normal toggle, but first check last_error on /rules/:id and fix the root cause (for example re-authorize an expired ad account token). Resuming without fixing re-trips the circuit breaker within hours.
Do paused rules catch up on missed evaluations when resumed?
No. When you resume a rule in Wevion, it picks up at the next cron tick (within 15 minutes) — there is no replay or catch-up for the time it was paused. Per-entity cooldowns from the past still apply if they remain within their window.
Steps
- /rules/:id shows lasterror (last error message that contributed to circuit-breaker trip) and autopausereason. Common errors: platformtokenexpired — ad account token revoked / expired platformapierror: ... — upstream API issue (transient or permanent) validationerror: budget below minimum — action params became invalid network_error — transient infrastructure
- Per error: Token issues → re-authorize the ad account (/connect/{platform}) Permanent API issues (e.g. platform deprecated an endpoint) → update the rule's action / metric Budget validation → adjust the rule's pct value or scope Transient → wait, then retry
- Manual toggle: /rules/:id → Resume. Sets status: active and clears autopausereason. If you resume without fixing: the rule will re-trip the circuit breaker within hours.
- Watch execution history. If errors persist and the circuit breaker re-pauses the rule: re-investigate before resuming again.
Last updated: 2026-05-17