Skip to content

Instantly share code, notes, and snippets.

@xionglun
Created February 15, 2017 07:55
Show Gist options
  • Save xionglun/8f785fd2a2c8295e996767de5daecaf8 to your computer and use it in GitHub Desktop.
Save xionglun/8f785fd2a2c8295e996767de5daecaf8 to your computer and use it in GitHub Desktop.
Use systemd's timer
[Unit]
Description=A timer service
[Service]
Type=simple
ExecStart=/bin/echo 'Hello, timer'
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=mytimer
[Unit]
Description=Run foo weekly and on boot
[Timer]
OnBootSec=15min
OnUnitActiveSec=1w
[Install]
WantedBy=timers.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment