airflow-systemd
July 18, 2026 ยท View on GitHub
Run and monitor systemd-managed jobs from Apache Airflow.
from airflow import DAG
from airflow_systemd import ServiceConfiguration, ServiceUnitConfiguration, Systemd, SystemdAirflowConfiguration
dag = DAG(dag_id="nightly-systemd", schedule="@daily")
config = SystemdAirflowConfiguration(
scope="user",
service={
"nightly": ServiceUnitConfiguration(
service=ServiceConfiguration(type="exec", exec_start="/opt/jobs/nightly")
)
},
)
Systemd(dag=dag, cfg=config)
The generated task lifecycle writes unit files, starts services, monitors state
with airflow-ha, handles retriggers, stops services, and optionally removes the
generated configuration. SystemdSSH applies the same lifecycle remotely.
Documentation
Published documentation is available at airflow-laminar.github.io/airflow-systemd.
Ecosystem
- systemd-pydantic supplies unit models and the systemctl client.
- supervisor-pydantic and cron-pydantic model alternative runtimes.
- airflow-supervisor provides the analogous supervisord lifecycle.
- airflow-cron converts cron jobs into ordinary Airflow tasks.
- airflow-pydantic supplies declarative task and connection models.
- airflow-config produces YAML-driven DAGs.
Note
This library was generated using copier from the Base Python Project Template repository.