For some reason, my backup is not working, when it is started by cron.Crontab entry0 10 * * * /home/yzT/BackupDaily.shBackupDaily.sh#!/bin/bash/home/yzT/Tools/FreeFileSync/FreeFileSync /home/yzT/Tools/FreeFileSync/BackupDaily.ffs_batchI can see cron starting my backup script in syslog.Oct 20 10:00:01 debian CRON[2589]: (yzT) CMD (/home/yzT/BackupDaily.sh) When I run it manually, the backup system (FreeFileSystem) creates a log file on my Desktop and I can see updated files in the backup directory. But via cron I do not get a logfile nor see any updates.How can I find/fix the problem?editI found the root of the problem. Switched to TTY and run the script, and I get the following message: Error: Unable to initialize GTK+, is DISPLAY set properly?. So, although there is no GUI using the script, it seems the script wants to have access to the GUI application. How can I fix this?
My backup is not working when started by Cron
cron
If you are the only user on the system, you can just edit your crontab (with crontab -e) and add DISPLAY=:0.0 at the top of the file.Alternatively, you can try running your backup job like so:/home/yzT/Tools/FreeFileSync/FreeFileSync /home/yzT/Tools/FreeFileSync/BackupDaily.ffs_batch --display=:0.0