airflow-cron¶
Generate declarative Airflow DAG models from cron configuration.
from airflow_cron import CronAirflowConfiguration, create_dags
config = CronAirflowConfiguration.model_validate(
{
"job": {
"backup": {
"schedule": "0 2 * * *",
"command": "/opt/jobs/backup",
}
}
}
)
dag_models = create_dags(config)
Each enabled user-crontab job becomes one airflow-pydantic DAG containing one
Bash task. The result can be instantiated directly or added to an
airflow-config configuration.
Documentation¶
Published documentation is available at airflow-laminar.github.io/airflow-cron.
Ecosystem¶
cron-pydantic provides the source crontab models.
supervisor-pydantic and systemd-pydantic model process managers.
airflow-supervisor and airflow-systemd manage long-running jobs.
airflow-pydantic supplies generated DAG and task models.
airflow-config applies shared YAML configuration and materializes DAGs.
Note
This library was generated using copier from the Base Python Project Template repository.