Created
October 25, 2018 07:31
-
-
Save Schnouki/a4864a8b7d2299ad477b599e66b24568 to your computer and use it in GitHub Desktop.
Start and stop gitlab-runner with 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
[Unit] | |
Description=Start gitlab-runner every morning | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/bin/systemctl start gitlab-runner.service |
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=Start gitlab-runner every morning | |
[Timer] | |
OnCalendar=Mon..Fri 8:00:00 | |
Persistent=true | |
[Install] | |
WantedBy=timers.target |
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=Stop gitlab-runner every evening | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/bin/systemctl stop gitlab-runner.service |
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=Stop gitlab-runner every evening | |
[Timer] | |
OnCalendar=Mon..Fri 16:30:00 | |
Persistent=true | |
[Install] | |
WantedBy=timers.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment