Linux systemd Service & Timer Unit Generator

Describe a job once and get a hardened, copy-ready .service plus .timer pair with user isolation, memory limits, and a full sandbox profile. Everything runs in your browser.

/etc/systemd/system/nightly-backup.service

    
/etc/systemd/system/nightly-backup.timer

    
Install & enable

  
Why use a systemd timer instead of cron?

Timers log to the journal (journalctl -u myjob.service), survive reboots with Persistent=true, support randomized delays to avoid thundering herds, and can enforce resource and sandbox limits because the work runs inside a real service unit. OnUnitActiveSec=1h schedules relative to the last run, while OnCalendar=*-*-* 03:00:00 fires at a wall-clock time.

What do User, NoNewPrivileges, and MemoryMax actually protect?

User= drops the process from root to an unprivileged account, so a compromised job cannot rewrite system binaries. NoNewPrivileges=yes blocks setuid/setgid escalation. MemoryMax= caps the cgroup memory footprint and makes the kernel OOM-kill the job instead of the host. Add ProtectSystem=strict plus explicit ReadWritePaths= to get a read-only filesystem everywhere the job does not need to write.