Systemd timer every 15 minutes

systemd

I'm trying to make a systemd timer that runs every 15 minutes. Right now I have:

  • timer-fifteen.timer:

    [Unit]
    Description=15min timer
    
    [Timer]
    OnBootSec=0min
    OnCalendar=*:*:0,15,30,45
    Unit=timer-fifteen.target
    
    [Install]
    WantedBy=basic.target  
    
  • timer-fifteen.target:

    [Unit]
    Description=15min Timer Target
    StopWhenUnneeded=yes
    

This runs over and over again without stopping. Does it need to be *:0,15,30,45:* instead? How can I make this work?

Best Answer

Your syntax translates to every 15 seconds, if you want every 15 minutes, IMO the most readable way is:

OnCalendar=*:0/15

An answer most similar to what you use in your question is:

OnCalendar=*:0,15,30,45

More information:

Related Question