Skip to content

Instantly share code, notes, and snippets.

@madsonic
Last active November 26, 2019 03:26
Show Gist options
  • Select an option

  • Save madsonic/6f2edfc9c5e13a7f67da5d559a2a5cc4 to your computer and use it in GitHub Desktop.

Select an option

Save madsonic/6f2edfc9c5e13a7f67da5d559a2a5cc4 to your computer and use it in GitHub Desktop.
timer service systemctl
# 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