cron-pydantic¶
Typed, YAML-friendly models for cron schedules, jobs, and crontab files.
from cron_pydantic import CronConfiguration
config = CronConfiguration.model_validate(
{
"environment": {"PATH": "/usr/local/bin:/usr/bin"},
"job": {
"backup": {
"schedule": "0 2 * * *",
"command": "/opt/jobs/backup",
}
},
}
)
print(config.to_cron())
cron-pydantic validates five-field and special schedules, renders user and
system crontabs, parses existing crontab text, and loads YAML. File output is
explicit; the package never installs or replaces a host crontab.
Documentation¶
Published documentation is available at airflow-laminar.github.io/cron-pydantic.
Ecosystem¶
supervisor-pydantic models supervisord processes.
systemd-pydantic models systemd services and timers.
airflow-supervisor manages supervisord jobs from Airflow.
airflow-cron converts cron jobs into Airflow DAG models.
airflow-systemd manages systemd services from Airflow.
airflow-pydantic supplies declarative Airflow models.
airflow-config loads YAML-based Airflow configurations.
Note
This library was generated using copier from the Base Python Project Template repository.