Created
April 19, 2016 18:49
-
-
Save zealws/67ab3c8927e441b1a1bd8a4206e8174b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# systemctl is-enabled say-hello.service | |
disabled | |
# systemctl is-enabled say-hello.timer | |
static | |
# systemctl status say-hello.service | |
● say-hello.service - Say hello | |
Loaded: loaded (/etc/systemd/system/say-hello.service; disabled; vendor preset: disabled) | |
Active: active (exited) since Tue 2016-04-19 11:26:21 PDT; 19min ago | |
Main PID: 14368 (code=exited, status=0/SUCCESS) | |
# systemctl status say-hello.timer | |
● say-hello.timer - Say hello every 3 minutes | |
Loaded: loaded (/etc/systemd/system/say-hello.timer; static; vendor preset: disabled) | |
Active: active (running) since Tue 2016-04-19 11:40:49 PDT; 5min ago | |
# systemctl list-timers | |
NEXT LEFT LAST PASSED UNIT ACTIVATES | |
Wed 2016-04-20 00:00:00 PDT 12h left Tue 2016-04-19 10:42:10 PDT 1h 4min ago logrotate.timer logrotate.service | |
Wed 2016-04-20 00:00:00 PDT 12h left Tue 2016-04-19 10:42:10 PDT 1h 4min ago man-db.timer man-db.service | |
Wed 2016-04-20 00:00:00 PDT 12h left Tue 2016-04-19 10:42:10 PDT 1h 4min ago shadow.timer shadow.service | |
Wed 2016-04-20 10:57:17 PDT 23h left Tue 2016-04-19 10:57:17 PDT 49min ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service | |
n/a n/a Tue 2016-04-19 11:40:49 PDT 6min ago say-hello.timer say-hello.service |
This file contains hidden or 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=Say hello | |
After=network.target | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/echo "Hello, World!" | |
TimeoutSec=0 | |
RemainAfterExit=yes | |
[Install] | |
WantedBy=multi-user.target |
This file contains hidden or 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=Say hello every 3 minutes | |
[Timer] | |
OnCalendar=*:0/3:* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment