Airflow DAG generation from cron syntax
Actively maintained. Last release 7 weeks ago, commits in 19 of the last 26 weeks. A safe choice.
$
pip install airflow-cronREADME as published on PyPI with version 0.1.2.
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.