Systemd timers are a modern alternative to cron for scheduling tasks.
Create a Service Unit
Create /etc/systemd/system/mybackup.service:
[Unit]
Description=My Backup Script
[Service]
Type=oneshot
ExecStart=/usr/local/bin/backup.shCreate a Timer Unit
Create /etc/systemd/system/mybackup.timer:
[Unit]
Description=Run backup daily
[Timer]
Persistent=true
[Install]
WantedBy=timers.targetEnable the Timer
systemctl daemon-reload
systemctl enable --now mybackup.timerCheck Timer Status
systemctl list-timers
systemctl status mybackup.timer