Use absolute paths, redirect output to a log, set PATH explicitly, and lock overlapping runs.
Writing a crontab that survives
Absolute paths
cron has a minimal PATH.
/usr/local/bin/backup.sh, notbackup.sh.Redirect output
cron mails stdout/stderr to the owner. On a modern system without a local MTA, that mail is lost. Redirect explicitly.
Set the environment
PATH,HOME,MAILTO, and any variables your script needs. cron does not load your.bashrc.Lock overlapping runs
Use
flock -n /var/lock/backup.lockso a long-running job does not start twice.Test the schedule
Use crontab.guru or a dry-run to verify the five fields. Off-by-one errors in cron are the most expensive kind.