Last active
November 12, 2020 05:46
-
-
Save ongzexuan/3f6c4d7504e2d01473f99e7861364d31 to your computer and use it in GitHub Desktop.
Systemd script for Airflow scheduler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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