0

I try to get a notification + sound everyday at 16PM. It's work but after that, i lost sound. I have to restart my computer.

The cron:

00 16 * * * /bin/bash /home/user/mynotifications.sh

mynotifications.sh:

#!/bin/sh

/usr/bin/spd-say "Hey, it's 16 PM !" -l "fr" -t "male2"
/usr/bin/notify-send -i     /usr/share/icons/Adwaita/256x256/status/trophy-gold.png "Notification title" "Notification message"

What's wrong here ?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
yoanm
  • 66
  • 9
  • The fundamental problem is that a script run from your crontab has no access to your interactive environment. – tripleee Sep 24 '16 at 13:21
  • 1
    I think this has to be reopened. It is not a duplicate of the linked question. The linked question talks about the `$DISPLAY` variable, but this one is related to dbus. – redneb Sep 24 '16 at 20:16

0 Answers0