Scheduling and pauses
When a rule pauses an ad, it specifies the duration — as the first argument of the pauseAd function (and its counterparts). The duration determines when the ad will return to work. The return happens automatically on the nearest check pass after the term has come.
pauseAd('24h', 'reason'); // for 24 hours
pauseAd('next_day_target_geo'); // until midnight in the ad's country
pauseAd('while_matches'); // while the condition holds
Available durations
| Value | What it does |
|---|---|
6h | A pause for 6 hours. |
12h | A pause for 12 hours. |
24h | A pause for 24 hours. |
next_day_target_geo | Until the start of the next day (midnight) in the time zone of the ad's country. |
next_day_ad_account | Until the start of the next day (midnight) in the time zone of the ad account. |
while_matches | Without a fixed term: the ad is held on pause as long as the rule keeps triggering. As soon as the condition stops being met — the ad returns on its own. |
permanent | No return term. The pause is lifted by hand — the Activate button on the Paused tab — or from code by the same rule (see Resume). |
These are the only allowed values. The rule will not accept any other duration value.
If the time zone of the country (for next_day_target_geo) or of the ad account (for next_day_ad_account) is not known, Britva does not guess the midnight: such a pause is held like while_matches — until the condition stops being met.
When a rule is turned off or deleted, its while_matches pauses are lifted on the next check pass, while pauses with a term — permanent included — keep it.
How to choose the duration
- Fixed 6h / 12h / 24h — when you need to "cool down" the ad for a specific term and give it another chance.
- Until midnight (in the geo or in the account) — when the logic is tied to the day: a daily budget, daily statistics, delivery by the local day. The difference between the two options — whose time zone to count midnight by: the country where the ad is shown or the ad account's settings.
- While the condition matches — the most "live" mode: the ad automatically goes on pause and automatically returns when the metrics recover. No need to guess the term.
- Permanent — when the ad definitely needs to be stopped and not returned without a manual decision.
If you don't want to guess the term — start with while_matches. Britva will return the ad itself as soon as the condition stops being met, and pause it again if the metrics worsen again.
The ad returns to work not exactly at the moment the pause expires, but on the nearest check pass after it. The check runs every 3 minutes, so a delay of up to 3 minutes is normal.