This script runs fine in terminal but not as a crontab entry:

#!/bin/bash
value=$RANDOM
while [ $value -gt 1800 ] ; do
  value=$RANDOM
done

sleep $value

notify-send -t 7000 -i /usr/share/icons/oxygen/64x64/status/dialog-warning.png 'test'

Crontab entry:

45 * * * * /usr/local/bin/reminder.sh

No cron log errors. Presumably need to change something in the script to get it to work from cron?

link
Nevermind, found an answer - need to add 'DISPLAY=:0' in the crontab entry – knef Nov 15 '11 at 9:21
If you wait a bit, you can answer this yourself using the appropriate button below. – slhck Nov 15 '11 at 9:26
feedback

migrated to serverfault.com by studiohack Nov 15 '11 at 19:23

This question belongs on our site for system administrators and desktop support professionals.

locked by Community Nov 15 '11 at 19:23

Browse other questions tagged or ask your own question.