$ show bart6114/cheek
cheek is a pico-sized declarative job scheduler written in Go. It reads a YAML schedule file defining jobs with cron expressions, retries, environment variables, working directories, and event-driven actions (webhooks, job chaining). The single binary provides a CLI (run, trigger, version) and an embedded HTTP server with a web UI for monitoring job execution and logs. Architecture is monolithic: the scheduler loop runs in a goroutine, executing jobs via os/exec with context cancellation for graceful shutdown. Job logs are persisted to SQLite. External dependencies include SQLite, cron parsing (gronx), HTTP routing (httprouter), CLI framework (cobra), config management (viper), and structured logging (zerolog). The codebase is well-tested, with comprehensive unit tests and CI/CD pipelines for cross-platform builds and Docker images.
The LLM identified 1 files worth highlighting for reuse:
Implements a clean strategy pattern for sending job notifications via different webhook types (generic, Slack, Discord). Each webhook type is a separate struct implementing a common `webhook` interface with `Call(jr *JobRun) ([]byte, error)`, `URL() string`, and `Name() string` methods. The implementations handle payload formatting (e.g., Slack's text field, Discord's content field) and HTTP POST requests. This component is self-contained, has no internal dependencies beyond standard library and the JobRun struct, and can be extracted and reused in any Go project needing multi-platform webhook notifications.