I need to show a notification from a cron job. My crontab is something like:
$ crontab -l # m h dom mon dow command * * * * * Display=:0.0 /usr
I found the answer:
$ crontab -l # m h dom mon dow command * * * * * export DISPLAY=:0.0 && export XAUTHORITY=/home/ravi/.Xauthority && sudo -u ravi /usr/bin/notify-send Hey "How are you"