I used Gnome-Scheduler as the task scheduler program since it has a nice and simple GUI. Command line users can use crontab. KDE desktop users can try KCRon or KTimer (Link 1 or Link 2).
Since I'm using Gnome desktop, I used Zenity for message popup option (you can also use xmessage). KDE desktop users can try KDialogue.
So the following packages are required -
- Task Scheduler (either crontab or Gnome-Scheduler)
- Message Dialog Box (either Zenity or xmessage)
I used Zenity and Gnome-Scheduler. Fortunately zenity is already installed with Gnome desktop environment. To install Gnome-Scheduler use the following command -
Fedora: yum -y install gnome-schedule
Ubuntu: apt-get install gnome-schedule
Now start gnome scheduler.
Click New. It will open the following -
You can also use task to run only once, which uses at in the background. There is also custom template but you might never need it.
By selecting recurrent will open a new window. Here you can specify a name of the job as well as the command to run. To popup a message at 12:30PM on every Wednesday I use the following -
Description : Test
Command : zenity --info --title "Test Message" --text "This is a test message"
Select X application in place of Default beahaviour
Select Advanced in Time & Date and insert my required time format as follow -
Minute : 30
Hour : 12
Weekday : 4
These are standard crontab systex.
For more information about cron systex see the manual page of crontab by typing
# man 5 crontab
Note that, the terminal window will not appear when your message pops up at scheduled time.
There are more you can do with Zenity other than merely popup informational message box. To know more about Zenity go to the Zenity Manual page.
Reference
How To Schedule Tasks With Gnome-Scheduler
Send Messages over Network – Gnome Popup Box Message
Zenity Manual
No comments:
Post a Comment