By running the crontab like this:
0 * * * * ~/bin/save_geany_files 2> /tmp/geanyerror.log
I found this error message in /tmp/geanyerror.log:
Geany: cannot open display
I solved this by adding the following line to .bashrc:
xhost local:arune > /dev/null
(where arune is my username) and changing my crontab to
0 * * * * export DISPLAY=:0.0 && ~/bin/save_geany_files 2> /tmp/geanyerror.log
My own save_geany_files-script looks like this:
#!/bin/bash cp /home/arune/geany/savenew.txt /home/arune/geany/saveold.txt /usr/bin/geany --list-documents > /home/arune/geany/savenew.txt
to store a "backup" for one hour extra.