Campaign Scheduler
Runs campaigns only inside their date windows — Black Friday starts at 00:00 without anyone staying up, sales end exactly on time, weekend campaigns run only on weekends.
by Dmytro Tonkikh·chiliad.io
Overview
Campaign Scheduler enforces date windows per rule: campaigns whose name matches the rule's filter are ENABLED inside the start–end window and PAUSED outside it, with an optional weekday restriction for weekend-only (or weekday-only) campaigns. The script fully owns the on/off state of matching campaigns — configure the sale window once and launch night takes care of itself. Google's native start/end dates can do part of this, but they're one-shot and buried per campaign; rules here are visible, repeatable and weekday-aware.
Setup
- 1Open your Google Ads account and go to Tools → Bulk Actions → Scripts.
- 2Click the + button to create a new script and paste the code below.
- 3Add your rules to RULES (see the commented examples): name filter + start/end dates, optional days.
- 4Keep PREVIEW_MODE = true for one run to verify which campaigns each rule catches, then set false.
- 5Schedule hourly.
Configuration Variables
| Variable | Default |
|---|---|
RULES | [] (examples in the code comments) |
PREVIEW_MODE | true |
EMAIL_ADDRESS | (empty) |
Expected Output
=== Campaign Scheduler (2026-11-27 FRIDAY, LIVE) === [ENABLED] Black Friday — Doorbusters (rule "Black Friday", window 2026-11-27 to 2026-11-30) [ENABLED] Black Friday — Shopping (rule "Black Friday", window 2026-11-27 to 2026-11-30) Email sent to you@example.com
Notes
The script owns the enabled/paused state of every campaign matching a rule — don't hand-toggle those campaigns or the next run will toggle them back; remove the rule instead. Windows are day-granular in the account time zone; with an hourly schedule, switches happen within the hour after midnight.