Blog - Ubuntu CRON weirdness

  • Home
    • Blog - Ubuntu CRON weirdness

Ubuntu CRON weirdness

Hrm, this is odd! I’ve been trying to work out on and off all week why a scheduled daily backup script won’t run on the new Ubuntu web server.

I’ve managed to work out, finally, that it’s because the script is called ‘backup.sh’ and not just ‘backup’, look:

root@bert:/home/ian# run-parts --test /etc/cron.daily/ | grep backup
root@bert:/home/ian# mv /etc/cron.daily/backup.sh /etc/cron.daily/backup
root@bert:/home/ian# run-parts –test /etc/cron.daily/ | grep backup
/etc/cron.daily//backup
root@bert:/home/ian#

That makes no sense to me at all, the permssions are the same as the other scripts and the hash-bang line is the same, why would giving it an extension matter!? Anyway, worth remembering!

Leave a Reply