What is Zenity?
It is a GNOME application that produces pop-up windows that can be used to send message to user. It also have file selection capabilities by using --file-selection option.
Example usage are:
zenity --info # sends a simple pop up message
zenity --info --text="Backup is running, press OK to close this window" # with user-defined message
How to run this in CRON?
Since CRON doesn't process X applications by default, you need to add the following option:
zenity --info --text="Hi, I was launched via CRON" --display=:0
Sources
http://promberger.info/linux/2009/01/02/running-x-apps-like-zenity-from-crontab-solving-cannot-open-display-problem/
zenity(1)
No comments:
Post a Comment