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.

Revisions

  1. xionglun created this gist Feb 15, 2017.
    9 changes: 9 additions & 0 deletions foo.service
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    [Unit]
    Description=A timer service

    [Service]
    Type=simple
    ExecStart=/bin/echo 'Hello, timer'
    StandardOutput=syslog
    StandardError=syslog
    SyslogIdentifier=mytimer
    9 changes: 9 additions & 0 deletions foo.timer
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    [Unit]
    Description=Run foo weekly and on boot

    [Timer]
    OnBootSec=15min
    OnUnitActiveSec=1w

    [Install]
    WantedBy=timers.target