Get the latest tech news

Working with Systemd Timers


The other day I thought to myself that it would be a good idea to have some backups of my data. So I was wondering, how would I execute a periodic backup task?

Cron is easy, very simple and robust mechanism to execute periodic tasks on a *nix server, and is available by default on all popular Linux distributions. The format for OnCalendar is actually DayOfWeek Year-Month-Day Hour:Minute:Second, but every component can be replaced by asterisk to signify any value. There are various Type values and you can find them in man systemd, but the reason I have used oneshot is that it essentially allows us to specify multiple ExecStart directives, and executing all the commands serially.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Systemd Timers

Systemd Timers