[CentOS] Display a warning message at a certain time ?
contact at kikinovak.net
Thu Feb 4 15:09:16 UTC 2010
Frank Cox a écrit :
> On second thought, a bash file calling zenity in a cronjob will be
> better. You can have zenity show any message you want in a window on
> the desktop and the only option available in that window can be "ok".
> kalarm would allow the user to change the alarm, and that's not what you
OK, I fiddled around with this, and here's what I got so far.
1) In an open GNOME session, when I launch GNOME terminal and type this:
$ zenity --info --text "Warning message!"
... I get exactly what I want.
2) When I put this line in a bash script (/usr/local/sbin/warning.sh)
and launch it from within Gnome Terminal, I get the same result (as
3) But when I add it to crontab like this :
# crontab -e
15 22 * * * /usr/local/sbin/warning.sh
... nothing happens at the given time (10:15 PM).
Any idea what's wrong here?
More information about the CentOS