Last active
August 29, 2015 14:25
-
-
Save rdark/aa3c73142efc2a5ce25e to your computer and use it in GitHub Desktop.
timer only running once
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=Etcd Backup Ruby %i | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
TimeoutStartSec=300 | |
EnvironmentFile=/etc/environment | |
EnvironmentFile=/etc/custom_environment | |
ExecStartPre=-/usr/bin/docker kill %p-%i | |
ExecStartPre=-/usr/bin/docker rm %p-%i | |
ExecStartPre=/usr/bin/docker pull ${REGISTRY_HOST}/company/%p:latest | |
ExecStart=/usr/bin/bash -l -c ' _ETCDCTL_CA_FILE_DATA="$(etcdctl get /$${CLUSTER_ENV}/services/etcd/cacert)"; .... docker run foo bar | |
ExecStop=/usr/bin/docker stop %p-%i |
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=Timer unit for Etcd Backup Ruby %i | |
After=docker.service | |
Requires=docker.service | |
[Timer] | |
OnActiveSec=2min | |
Unit=%p@%i.service | |
[Install] | |
WantedBy=timers.target | |
[X-Fleet] | |
MachineOf=%p@%i.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
core@ip-172-16-20-143 ~ $ systemctl list-timers --all | |
NEXT LEFT LAST PASSED UNIT ACTIVATES | |
Tue 2015-07-21 11:25:05 UTC 8s left Tue 2015-07-21 11:24:05 UTC 51s ago motdgen.timer motdgen.service | |
Tue 2015-07-21 11:26:19 UTC 1min 22s left n/a n/a [email protected] [email protected] | |
service runs, and then: | |
core@ip-172-16-20-143 ~ $ systemctl list-timers --all | |
NEXT LEFT LAST PASSED UNIT ACTIVATES | |
n/a n/a Tue 2015-07-21 11:26:20 UTC 4min 3s ago [email protected] [email protected] | |
Tue 2015-07-21 11:31:10 UTC 46s left Tue 2015-07-21 11:30:10 UTC 13s ago motdgen.timer motdgen.service | |
Tue 2015-07-21 16:44:24 UTC 5h 14min left Mon 2015-07-20 16:44:24 UTC 18h ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service | |
n/a n/a n/a n/a update-engine-stub.timer update-engine-stub.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment