Last active
November 26, 2019 03:26
-
-
Save madsonic/6f2edfc9c5e13a7f67da5d559a2a5cc4 to your computer and use it in GitHub Desktop.
timer service systemctl
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
| # foo.service | |
| [Unit] | |
| Description=do something | |
| [Service] | |
| Type=oneshot | |
| ExecStart=/usr/bin/script1 | |
| ExecStart=/usr/bin/script2 | |
| [Install] | |
| WantedBy=multi-user.target | |
| # foo.timer | |
| # both timer and unit file should have same name | |
| [Unit] | |
| Description=Run script weekly | |
| [Timer] | |
| OnCalendar=weekly | |
| [Install] | |
| WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment