Monday, March 19, 2018

Scheduling Ubuntu program with gnome-schedule

In Ubuntu you can schedule any task to run automatic or on a specific time.
For this either you can use gnome-schedule GUI or using crontab command.

Using gnome-schedule

=========================
1.   First make sure your program is running properly.
2.   Open the terminal (using Ctrl+Atl+t shortcut key).
3.   Enter the following command to install gnome-schedule
sudo apt-get install gnome-schedule
4.   Enter gnome-schedule command in the terminal window to open the desired GUI, as given below.

5.   Now click on "New" button.
6.   Select "A task that launches recurrently" option to execute the programm repeatedly in a specific time inerval.


7. Enter the Description and Command in corresponding fields.
8. Click Advanced radio button to explicitly mention the execution time. Now click on "Add" button.
    Examples:
                    Minute: 5, Hour: 15,  Day: *, Month: *, Weekday: *
                          This will execute the program Everyday, every month, at time 15:05 (3:05 PM)

    Click here to see some examples.  


Using crontab command

==========================
1.   Open terminal (using Ctrl+Atl+t shortcut key).
2.   Enter crontab -e
3.   Add one line in following format at the end of the file.
          <minute> <hours> <day> <month> <weekday> <Command to execute>
4.   Now save the file.

That's all.




No comments:

Post a Comment