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
If you are having issue that your notify-send script is working fine locally but it is not working with cron jobs then use this command. and replace "saurav" with your username.
sudo -u saurav DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send "Your message goes here"