systemd - timer unit

 

 


my-service.service

[Unit]
Description=Run My Service every 10 seconds

[Timer]
OnUnitActiveSec=10s
Unit=my-service.service

[Install]
WantedBy=timers.target


sudo systemctl enable my-service.timer

sudo systemctl start my-service.timer

 

Creative Commons license icon Creative Commons license icon