# Gnome Schedule User Guide V2.2

## Introduccion

Gnome Schedule is a graphical tool that lets you schedule tasks with ease, to be run unattended at a specified time or periodically. These tasks, also known as jobs, can be either a command with its corresponding parameters or a script file with multiple instructions.

You can use Gnome Schedule to program repetitive tasks in your daily work that can be automated. You can also run a heavy task at night while you are sleeping, for example, backing up your documents.

### How does Gnome Schedule work?

Gnome Schedule uses cron and at to program job executions. These are two system services commonly used by Linux-like systems. Gnome Schedule provides a single graphical interface to configure both and present jobs in a way easy to understand for everyone.

### About cron and at

Cron

If you were to configure cron manually to execute a command, for example every Tuesday, you would have to use the command `crontab` in this way:

    $ crontab -e
    * * * * 2 <command> --parameters  #comments

See `man cron` and `man crontab` for more information about cron

At

If you were to configure at manually to execute a command, for example tomorrow at this time, you would have to use the command `at` in this way:

    $ at tomorrow
    at> <command_1> --parameters
    at> <command_2> --parameters
    at> Ctrl + D

See `man at` for more information about at

## Per començar

### To Start Gnome Schedule

You can start Gnome Schedule in the following ways:

Menut Applications

- Choose System Tools Schedule .

Linha de comanda

- To start Gnome Schedule from a command line, type the following command, then press Return:

  `gnome-schedule`

### When You Start Gnome Schedule

When you start Gnome Schedule, the main window is displayed:

#### Main Window

Shows Gnome Schedule main window. Contains title bar, tool bar, and task list.

The Gnome Schedule main window contains the following elements:

The tool bar.

- The tool bar contains buttons that give you access to every function in the application.

Task list.

- The Task list shows information about current scheduled tasks and pending jobs. For every task, the following information is detailed:

  Task:

- Describes the type of the task: "Recurrent", when the task runs repeatedly or "Once", when the task is done only once.

Description:

- Shows a brief description of the task.

Date and Time:

- Shows when the task is going to be executed.

Command preview:

- Shows the command that is going to be executed.

You can read a brief description of some of the objects and icons on the Gnome Schedule interface, by pointing them with the mouse and waiting for a few seconds.

## Adding a New Scheduled Task

### Choosing the type of task to add

You can add a new scheduled task by pressing the New button in the main window tool bar.

The following dialog window will appear letting you to choose the type of task you want to schedule:

#### Task Type Selection Dialog Window

Shows Gnome Schedule task type selection dialog window.

- by pressing the first button you will be able to schedule a task that will be executed periodically.

- by pressing the second button you will be able to schedule a task that will only be executed once.

- by pressing the third button you will be able to create a task from a template. Templates usage is explained in myapp-templates.

### Adding a scheduled task that will launch recurrently

Choosing this option, the following dialog window is shown:

#### "Create a New Scheduled Task" window

Shows Gnome Schedule "Create a New Scheduled Task" window.

Descripcion

- Lets you add a brief description of the task.

Comanda

- Enter here the command or script that will be periodically executed by this task.

Time & Date

Basic

- Lets you select the frequency for task execution among a list of common intervals.

Advanced

- Lets you create custom time expressions in case you need more flexibility.

Preview

Lets the user check if the selected frequency is correct.

### Adding a scheduled task that will launch once

Choosing this option the following dialog window is shown:

#### "Create a New Scheduled Task" window

Shows Gnome Schedule "Create a New Scheduled Task" window

## Modifying a Scheduled Task

You can modify a scheduled task by selecting it from the Task list with one click and by pressing the Edit button from the main window tool bar. Then, the Edit a Scheduled Task window will be opened showing the task properties.

Now, you will be able to modify any field you want. When you have finished you can press Apply button to save the changes or Cancel button to omit them.

You can edit a task faster by simply double-clicking on it in the task list.

## Deleting a Scheduled Task

You can delete a scheduled task by selecting it from the Task list with one click and by pressing the Delete button in the main window tool bar. Next, you will be asked for confirmation. By answering Yes, the scheduled task will be removed from the Task list.

Non-recurrent tasks disappear automatically from the list when they are done.

## Manually Running Scheduled Task

You can trigger a scheduled task by selecting it from the Task list with one click and by pressing the Run task button in the main window tool bar.

The task will be executed and its output will be displayed in a terminal window, letting you check if the task is correctly set.

## Using Templates

Gnome Schedule lets you save tasks as templates in order to reuse it later. This way, you will be able to create new scheduled tasks faster.

To manage templates press the Template button on the main window tool bar. A new window will show you a list of available templates. From this window you can create, modify, delete and use templates.

### Template manager window

Shows the "Manage templates" window

You can have common tasks saved as templates. So, you will not have to write the same stuff again and again!

## Using Gnome Schedule as root

When you use Gnome Schedule as superuser, you can view, edit and add other users scheduled tasks.

You can change the user by pressing the Change User button in the main window tool bar. Then, a dialog window will be shown. Choose the desired user from the drop-down list and press OK button. Now the main window will show the scheduled tasks of the selected user.

Please, keep in mind that this option is only available for system administrators.

## Using Gnome Schedule to launch graphical applications

You can use Gnome Schedule to launch a graphical application automatically, but there are some information you would consider before:

### About DISPLAY environment variable

When you run a graphical application from the command line you must first set the environment variable DISPLAY. This variable is used to tell your graphical application what X server to use. Normally you will want to use the one installed on your own computer. In that case you need to set the DISPLAY variable in this way:

`DISPLAY=:0.0`

where :0.0 means use screen 0 of X server 0 in this computer.

If you want display the application in a remote screen you can specify the IP address of the remote X server:

`DISPLAY=192.168.0.25:0.0`

### Setting DISPLAY variable for tasks that will launch once

When you are creating or modifying a task, you can define the DISPLAY variable in the script text box. Make the definition at the beginning of the script.

### Setting DISPLAY variable for tasks that will launch recurrently

Gnome Schedule does not support yet setting environment variables for recurrent tasks, but it will do soon. In the meantime, you can manually create a script that first defines DISPLAY variable and then calls the graphical application. Finally, you can create a recurrent task to launch the script.

### About X server

The X server is part of the X Window System. It is in charge of drawing windows on the screen and processing the user input from a keyboard or any other peripheral.

If you need more information about X server or the X Window System you can read its entry in the Wikipedia.

## About Gnome Schedule

### Autors

Gnome Schedule was written by Philip Van Hoof (pvanhoof@gnome.org), Kristof Vansant (de_lupus at pandora dot be) and Gaute Hope (eg@gaute.vetsj.com). To find more information about Gnome Schedule, please visit the Gnome Schedule Web Page.

### Reporting Bugs

To report a bug or make a suggestion regarding this application or this manual, follow the directions in this document.

### Licéncia

This program is distributed under the terms of the GNU General Public license as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. A copy of this license can be found at this link, or in the file COPYING included with the source code of this program.