finds.dev

dilipvamsi/sqlite-cron

A background job scheduler for SQLite inspired by pg_cron. Supports persistent task scheduling via background threads or query-based callbacks.

View on GitHub

★ 2CMITupdated Feb 2026

// the take

A SQLite extension that brings pg_cron-style job scheduling to SQLite databases. Written in C, it adds cron SQL functions directly to any SQLite connection and persists jobs in ordinary tables. The dual-mode design — background thread or progress-handler callback — is the interesting part, since it handles environments where thread spawning isn't possible.

The callback mode using sqlite3_progress_handler is genuinely clever — it gives you scheduled execution in WASM and other single-threaded environments without any external scheduler. Job persistence in __cron_jobs means schedules survive restarts without extra ceremony. The retry configuration per-job (cron_set_retry) is the kind of operational detail most hobby schedulers skip. The shutdown flow with ref-counting across connections is correctly thought through.

Two stars and no forks as of mid-2026 means this is essentially untested in production; the 91% coverage badge is self-reported and covers a single .c file. Timezone support is offset-only (+05:30 style) — no named zones, so DST transitions will silently run jobs at the wrong wall-clock time. The background thread opens its own separate DB connection, which sidesteps WAL locking issues but also means it can't see in-flight transactions from the main connection — a job that reads data written by the main thread may see stale state. There's no mechanism to run a job at most once across multiple processes sharing the same SQLite file.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
2
Forks
0
Language
C
License
MIT
Last commit
10 Feb 2026

// nearby

If sqlite-cron isn't quite it.

All repos →