Skip to main content

sioncronaich

sioncronaich - A lightweight cron-job monitoring tool written in Python - from Gaelic "to synchronise, to chronicle"

Python 3.12+ Ruff pre-commit Coverage

sioncronaich wraps any shell command, captures its stdout, stderr and exit code, then POSTs the result to the sioncronaich web app, which stores everything in a local SQLite database and renders it in a simple web dashboard.


Quick start

1 — Start the web app

uv run uvicorn --factory sioncronaich.app:create_app --host 127.0.0.1 --port 8716

Pass --host, --port, and any other server options directly to uvicorn. See uvicorn --help for the full list.

Settings can be supplied via environment variables, a YAML file, or a .env file. Resolution order (highest priority first):

  1. SIONCRONAICH_* environment variables
  2. YAML file at $SIONCRONAICH_CONFIG, or ./sioncronaich.yaml if present
  3. .env file at $SIONCRONAICH_ENV_FILE, or ./.env if present
  4. Built-in defaults

All SIONCRONAICH_* variables below have a matching lower-case YAML key (e.g. SIONCRONAICH_SMTP_HOST → smtp_host).

Environment variable YAML key Default Purpose
SIONCRONAICH_CONFIG — (unset) Path to a YAML config file. If unset, ./sioncronaich.yaml is auto-discovered
SIONCRONAICH_ENV_FILE — (unset) Path to a .env file. If unset, ./.env is auto-discovered
SIONCRONAICH_DB db ~/.local/share/sioncronaich/jobs.db SQLite database path
SIONCRONAICH_ROOT_PATH root_path /sioncronaich ASGI root path when mounted behind a reverse proxy
SIONCRONAICH_FAILURES_ONLY failures_only false Set to 1, true, or yes to discard successful job results without storing them
SIONCRONAICH_ALERT_EMAIL alert_email (unset — alerts disabled) Send a failure-alert email to this address whenever a job exits non-zero
SIONCRONAICH_ALERT_COOLDOWN_MINUTES alert_cooldown_minutes 60 Per-job cooldown between failure-alert emails (minutes). 0 disables cooldown
SIONCRONAICH_SMTP_HOST smtp_host localhost SMTP server hostname
SIONCRONAICH_SMTP_PORT smtp_port 25 SMTP server port
SIONCRONAICH_SMTP_FROM smtp_from sioncronaich@<hostname> Sender address
SIONCRONAICH_SMTP_USERNAME smtp_username (unset) SMTP login username
SIONCRONAICH_SMTP_PASSWORD smtp_password (unset) SMTP login password
SIONCRONAICH_SMTP_STARTTLS smtp_starttls false Set to 1, true, or yes to issue STARTTLS after connecting
SIONCRONAICH_SMTP_SSL smtp_ssl false Set to 1, true, or yes to connect with SMTP_SSL (implicit TLS)
SIONCRONAICH_SMTP_TIMEOUT smtp_timeout 10 SMTP connection timeout, seconds
LOG_CONFIG — (unset — logs to stderr at INFO) Path to a YAML logging config file

Empty env var values (e.g. SIONCRONAICH_DB=) are treated as unset and fall through to the next source.

Example sioncronaich.yaml:

db: /var/lib/sioncronaich/jobs.db
failures_only: false
root_path: /sioncronaich

alert_email: ops@example.com
alert_cooldown_minutes: 60

smtp_host: mail.example.com
smtp_port: 587
smtp_from: sioncronaich@example.com
smtp_username: sioncronaich
smtp_password: secret
smtp_starttls: true

2 — Wrap a command

sioncronaich --name "daily-backup" -- /usr/local/bin/backup.sh --full

The wrapper exits with the same exit code as the wrapped command, so existing cron alerting is unaffected. If posting to the web app fails, the error is printed to stderr but the exit code is still that of the wrapped job.

Usage: sioncronaich [OPTIONS] COMMAND...

Options:
  --name TEXT       Human-readable label for this job  [required]
  --endpoint TEXT   URL of the POST /jobs endpoint
                    [default: http://127.0.0.1:8716/jobs]
  --timeout INT     HTTP request timeout in seconds  [default: 10]
  --failures-only   Only report the job if it exits with a non-zero code

The endpoint can also be set via the SIONCRONAICH_ENDPOINT environment variable so you don't have to repeat it in every crontab entry. The --endpoint flag takes precedence if both are set.

export SIONCRONAICH_ENDPOINT=http://mon.example.com/sioncronaich/jobs

--failures-only is useful for jobs that run very frequently where only failures are worth keeping. It can also be enabled globally on the server via SIONCRONAICH_FAILURES_ONLY=1, which will discard successful results regardless of how the script was invoked.

3 — Add to crontab

# m   h  dom mon dow  command
0     3  *   *   *    sioncronaich --name daily-backup -- /usr/local/bin/backup.sh
*/5   *  *   *   *    sioncronaich --name health-check -- /usr/local/bin/check.sh

4 — View the dashboard

Open http://127.0.0.1:8716 in a browser for a colour-coded table of recent job runs. stdout / stderr are available in collapsible panels.

The raw JSON API is also available:

Method Path Description
POST /jobs Ingest a new job result (used by sioncronaich)
GET /jobs List job results as JSON (newest first)
GET / HTML dashboard

Interactive API docs are served at http://127.0.0.1:8716/docs.


Reverse proxy with Caddy

sioncronaich is designed to be mounted at a sub-path behind a reverse proxy. The default sub-path is /sioncronaich; override it with SIONCRONAICH_ROOT_PATH.

example.com {
        reverse_proxy /sioncronaich/* 127.0.0.1:8716
        reverse_proxy /sioncronaich* 127.0.0.1:8716
}

Start the app with the matching root path:

SIONCRONAICH_ROOT_PATH=/sioncronaich \
  uv run uvicorn --factory sioncronaich.app:create_app --host 127.0.0.1 --port 8716

The dashboard is then available at https://example.com/sioncronaich and the ingest endpoint at https://example.com/sioncronaich/jobs.


Logging

By default the app logs to stderr at INFO level. To use a custom logging configuration, point LOG_CONFIG at a YAML file in the standard logging.config.dictConfig format. A ready-to-use example is provided at logging.yaml:

LOG_CONFIG=logging.yaml uv run uvicorn --factory sioncronaich.app:create_app

Development

uv sync --all-extras
uv run prek install

Metadata

Release files for sioncronaich 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sioncronaich 0.7.0
File Size Uploaded Provenance Actions
sioncronaich-0.7.0.tar.gz 33.8 kB With provenance Details for sioncronaich-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sioncronaich 0.7.0
File Interpreter ABI Platform Actions
sioncronaich-0.7.0-py3-none-any.whl Python 3 none any Details for sioncronaich-0.7.0-py3-none-any.whl

Total release size: 70.1 kB

Release files / sioncronaich-0.7.0.tar.gz

Download URL sioncronaich-0.7.0.tar.gz
Size 33.8 kB
Tags Source
SHA-256 checksum
How to use checksums
faf59df10c234c4e132f86f4c47b4281f550ec7cf81c2c1d18f469aaa31cca18
BLAKE2b-256 checksum
How to use checksums
bc7cc190f4ef832b51344a460008dc19911db8802775d4706baf50c1ed4c917e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / sioncronaich-0.7.0-py3-none-any.whl

Download URL sioncronaich-0.7.0-py3-none-any.whl
Size 36.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03c8187a3120300d7afdd0763c7dbf543b23c85b6391ea62081db3ec50a84cea
BLAKE2b-256 checksum
How to use checksums
36e272a0ab2b65978719f3dea2797f47cfa6b1ea0f7ccb10fdff88a585dd4cfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Security for sioncronaich 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sioncronaich-0.7.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page