Day 022 / Frappe / Configuration Drift

Scheduler Snapshot

View source ↗Scroll to explore ↓
Scheduler Snapshot project cover
/ Overview

A read-only Python CLI that snapshots scheduler-related Frappe site configuration and compares saved states without exposing unrelated values.

NameScheduler Snapshot

ClientIndependent daily build

IndustriesDeveloper and operations tooling

DateDay 022 · September 21, 2026

/ Challenge

Scheduler intent can drift between common and per-site Frappe configuration, while printing full site configuration risks exposing passwords, tokens and unrelated operational values.

/ Provided services

Clear thinking.
Practical delivery.

01

Configuration snapshot

Discovers Frappe sites and records only scheduler pause and maintenance intent plus the source of each setting.

02

Privacy-conscious comparison

Detects added, removed and changed sites without retaining database passwords, API keys or arbitrary configuration values.

03

Automation-ready reporting

Provides readable and JSON output with distinct exit codes for clean state, findings and invalid input.

Scheduler Snapshot feature visual
/ Solution

Scheduler Snapshot reads only pause_scheduler and maintenance_mode, resolves common-versus-site precedence, records a deterministic JSON snapshot and compares two saved states. It never executes Bench commands, connects to services or changes the bench.

/ Impact

Allowlisted scheduler-state inspection

Common and site precedence reporting

Deterministic snapshot comparison

Unrelated configuration values omitted

Nine passing standard-library tests

/ Tech stack

Python standard library

Pathlib, JSON, dataclasses and argparse provide the complete dependency-free utility.

Frappe configuration

Models common_site_config and site_config precedence for two scheduler-related flags only.

Unittest

Nine temporary-fixture tests cover precedence, state classification, privacy, comparison, files and CLI exit behavior.

Next project

Bench Doctor Lite

View case study ↗