🔍 See Original Answer on Ask Ubuntu 🔗
My daily backup crashed, how can I rerun cron daily?
August 11, 2021
November 24, 2022
Copy to clipboard: false
This answer is close but you really want to use:
sudo run-parts /etc/cron.daily
The linked answer omits
sudo and my daily backup crashed again. This is because the same
.tar work file (with errant 30 MB file) that was created with
sudo privileges (which cron runs with) still existed.
I had removed the “bad” 30 MB file but the earlier
.tar file created by the original
cron job was still about. My regular user privileges simply were insufficient to recreate a new
If you call
sudo your environment is different. Using
run-parts makes it work. In my case at least.