Last active
July 29, 2016 18:46
-
-
Save zealws/fb935ccedec9fbdc98c8407d270ab214 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
# cat /root/blah.timer | |
[Unit] | |
Description=Run scheduled task blah | |
After=network.target | |
[Timer] | |
OnCalendar=*:0/5:0 | |
AccuracySec=1s | |
Persistent=false | |
RandomizedDelaySec=3600s | |
Unit=blah.service | |
[Install] | |
WantedBy=multi-user.target | |
# cat /root/blah.service | |
[Unit] | |
Description=Run scheduled task blah | |
After=network.target | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/bin/echo 'Hello, world' | |
TimeoutSec=0s | |
StandardOutput=null | |
# sudo systemctl link /root/blah.timer | |
Created symlink /etc/systemd/system/blah.timer → /root/blah.timer. | |
# sudo systemctl link /root/blah.service | |
Created symlink /etc/systemd/system/blah.service → /root/blah.service. | |
# ls -l /etc/systemd/system/blah.* | |
lrwxrwxrwx 1 root root 18 Jul 29 11:31 /etc/systemd/system/blah.service -> /root/blah.service | |
lrwxrwxrwx 1 root root 16 Jul 29 11:31 /etc/systemd/system/blah.timer -> /root/blah.timer | |
# sudo systemctl enable blah.timer | |
Failed to enable unit: Too many levels of symbolic links |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment