Page 1 of 1

Backup works, but not in crontab...

Posted: Sunday 24 December 2017 13:07
by Jumper3126
Hi,
Anyone has an idea where this goes wrong?
I used the bash script to backup to my NAS. This works fine if I use the manual command:

Code: Select all

sudo ~/domoticz/scripts/bash/Domoticz_Backup.sh

However, I want to have it run daily in crontab. The following command however appears not to work, and I discovered it too late, after my system crashed last night and I dont have a recent backup :? Other crontab commands work fine.

Code: Select all

0 15 * * * sudo ~/domoticz/scripts/bash/Domoticz_Backup.sh

Domoticz_Backup.sh was made executable by the way

Re: Backup works, but not in crontab...

Posted: Sunday 24 December 2017 13:19
by CaesarPL
Seems fine. Maybe providing full path to script will help?

Re: Backup works, but not in crontab...

Posted: Sunday 24 December 2017 14:51
by Jumper3126
good news: that worked!
bad news: no idea why this worked, thought programming was all about logic.
Anyhow, thanks for the help