Ubuntu notify-send Scheduled Notifications

When using Ubuntu for work or school, you may want to schedule reminders, such as when to drink water or clock out. Using notify-send and crontab makes this easy:

➜ ~ env |grep -E 'DISP|DBUS' DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus ➜ ~ crontab -l |grep -v ^#

          • DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send 'Emergency Notice' ' Is this world very quiet? ' -i /home/mephisto/Pictures/404.jpg ➜ ~ cat /etc/issue Ubuntu 22.04 LTS \n \l ➜ ~ notify-send --help Usage: notify-send [OPTION…] [BODY] - create a notification

Help Options: -?, --help Show help options

Application Options: -u, --urgency=LEVEL Specifies the urgency level (low, normal, critical). -t, --expire-time=TIME Specifies the timeout in milliseconds at which to expire the notification. -a, --app-name=APP_NAME Specifies the app name for the icon -i, --icon=ICON[,ICON...] Specifies an icon filename or stock icon to display. -c, --category=TYPE[,TYPE...] Specifies the notification category. -h, --hint=TYPE:NAME:VALUE Specifies passing basic extra data. Valid types are int, double, string, and byte. -v, --version Version of the package.

First, check the values of the environment variables DISPLAY and DBUS_SESSION_BUS_ADDRESS. Then, as shown above, add your own prompt task. After testing, I found that DISPLAY isn't required. The second environment variable setting seems a bit complicated, and since this is a small feature with limited usage, I'm too lazy to verify it. Those with the energy and interest are welcome to explore it.

Lastmod: Friday, August 8, 2025

See Also:

Translations: