Created
March 20, 2017 09:47
-
-
Save FUT/0c5a516b6f89d8c8ff4b189147374879 to your computer and use it in GitHub Desktop.
SystemD timers
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
sudo systemctl daemon-reload | |
sudo systemctl enable exporter.timer | |
sudo systemctl status exporter.timer | |
sudo systemctl list-timers --all | |
sudo systemctl list-timers | |
sudo systemctl start exporter.service | |
sudo systemctl start exporter.timer |
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=Business contacts exporter | |
[Service] | |
WorkingDirectory=/var/www/app/backend | |
ExecStart=/usr/bin/docker-compose up exporter |
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=Run exporter on daily basis | |
Requires=exporter.service | |
[Timer] | |
OnCalendar=*-*-* 13:00:00 | |
Persistent=true | |
Unit=exporter.service | |
[Install] | |
WantedBy=timers.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment