Skip to content

Instantly share code, notes, and snippets.

@ongzexuan
Last active November 12, 2020 05:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ongzexuan/3f6c4d7504e2d01473f99e7861364d31 to your computer and use it in GitHub Desktop.
Save ongzexuan/3f6c4d7504e2d01473f99e7861364d31 to your computer and use it in GitHub Desktop.
Systemd script for Airflow scheduler
[Unit]
Description=Airflow scheduler daemon
After=network.target
Wants=postgresql.target
[Service]
Environment="PATH=/home/airflow/.local/bin"
User=airflow
Group=airflow
Type=simple
ExecStart=/bin/bash -c "export AIRFLOW_HOME=/home/airflow/airflow; airflow scheduler"
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
Restart=on-failure
RestartSec=10s
PrivateTmp=True
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment