Backup works, but not in crontab...

All kinds of 'OS' scripts

Moderator: leecollings

Post Reply
Jumper3126
Posts: 105
Joined: Thursday 31 December 2015 15:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Backup works, but not in crontab...

Post 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
CaesarPL
Posts: 104
Joined: Tuesday 08 November 2016 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

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

Post by CaesarPL »

Seems fine. Maybe providing full path to script will help?
HW:Raspberry PiB+,Pi3,PiB,RFLink,FA20RF,DCS-930L,DCS-935L,Clarus switches,RF Temp sensors,Owl Micro+,Mi Flora,Kerui,Yeelight,Xiaomi,Broadlink RMM3,Alexa
SF:Jessie,Dmtcz 3.8153,Logitech Media srv,PiCorePlayers,Dashticz,Max2Play,InfluxDB,Grafana,HABridge
Jumper3126
Posts: 105
Joined: Thursday 31 December 2015 15:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Jumper3126 »

good news: that worked!
bad news: no idea why this worked, thought programming was all about logic.
Anyhow, thanks for the help
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest