# The &kcron; Handbook

## Introduction

&kcron; is an application for scheduling programs to run in the background. It is a graphical user interface to `cron`, the &UNIX; system scheduler.

## Using &kcron;

Don't forget to tell your system to start the `crond` cron daemon first, or &kcron; won't work.

### &kcron; Start Up

When &kcron; starts you will see a summarized view of existing scheduled tasks and associated environment variables. If you are running as the root user, you will see these items for all users on the computer as well as the system scheduled tasks. Each of the folders can be expanded and contracted.

&kcron; at start up. &kcron; at start up.

#### Scheduled Tasks

Scheduled tasks appear under a Tasks folder. For each scheduled task, the following are displayed:

Name

- Name to identify the scheduled task.

Value

- Program file and parameters.

Description

- Natural language description of scheduled task.

If a task has been disabled, no program file and parameters will appear, and the description will be disabled.

#### Environment Variables

Environment variables appear under a Variables folder. For each environment variable, the following are displayed:

Name

- Variable name.

Value

- Variable value.

Description

- Natural language description of variable.

Environment variables appearing here will override any existing environment variable for all scheduled tasks. If an environment variable has been disabled, no value will appear and the description will be disabled.

&kcron; main window &kcron; main window

### Adding Scheduled Tasks

To create a new scheduled task, first select the Tasks folder. Then select Edit New... . Alternatively, you can use the right mouse button menu and choose New..., or simply press Ctrl N.

#### The Edit Task Dialog

Edit Task dialog. Edit Task dialog

Comment

- Enter a description of the task to schedule.

Program

- Enter the name of the program. You can specify either a relative path or absolute path. If you want to look up the program, click Browse....

Enabled

- To enable or disable the task, select or de-select Enabled.

Silent

- Turns off logging of the command and the output from the command.

Months

- Select the months during which the task is to be scheduled.

Days of the Month

- Select the days of the month on which the task is to be scheduled.

Days of the Week

- Select the days of the week on which the task is to be scheduled.

Daily

- If you want to schedule the task to run daily, select Run every day.

Hours

- Select the hours on which the task is to be scheduled.

Minutes

- Select the minute at which the task is to be scheduled. &kcron; does not support scheduling tasks at smaller than five minute intervals.

OK

- Completes the creation of this task.

Cancel

- Cancels the creation of this task.

If you select both days of the month, and days of the week, the task will run when either condition is met. For instance, if you select the 1st and 15th, and select Sunday, the program will be run every 1st and 15th of the selected months (regardless of day of week) as well as every Sunday of the selected months (regardless of day of the month).

The scheduled task is not actually set up until the `crontab` has been saved.

### Managing Scheduled Tasks

As with creating new tasks, changes to tasks will not actually be made until the `crontab` is saved.

#### Cutting Scheduled Tasks

To cut a scheduled task, first select the task to be cut. Then select Edit Cut.

Alternatively, you can use the right mouse button menu and choose Cut, or simply press Ctrl X.

#### Copying Scheduled Tasks

To copy a scheduled task, first select the task to be copied. Then select Edit Copy .

Alternatively, you can use the right mouse button menu and choose Copy, or simply press Ctrl C.

#### Pasting Scheduled Tasks

To paste a scheduled task, first a scheduled task must have already been cut or copied to the clipboard. Once a scheduled task has been cut or copied, paste will be enabled. Then select the Tasks folder. Finally, select Edit Paste .

Alternatively, you can use the right mouse button menu and choose Paste, or simply press Ctrl V.

#### Modifying Scheduled Tasks

To modify a scheduled task, first select the task to be modified. Then select Edit Modify... .

Alternatively, you can use the right mouse button menu and choose Modify..., or simply press Ctrl O. You will see the Edit Task dialog, with which you would modify the task as described above.

#### Deleting Scheduled Tasks

To delete a scheduled task, first select the task to be deleted. Then select Edit Delete .

Alternatively, you can use the right mouse button menu and choose Delete.

#### Enabling/Disabling Scheduled Tasks

To enable or disable a scheduled task, first select the disabled task. Disabled tasks will have Disabled in their descriptions. Then select Edit Enabled .

Alternatively, you can use the right mouse button menu and choose Enabled. Confirm that the scheduled task's program name, parameters, and description are correctly displayed.

#### Running Scheduled Tasks

To run a scheduled task immediately, first select the task. Then select Edit Run Now .

Alternatively, you can use the right mouse button menu and choose Run Now.

### Adding Environment Variables

To create a new environment variable, first select the Variables folder. Then select Edit New... .

Alternatively, you can use the right mouse button menu and choose New..., or simply press Ctrl N.

#### The Edit Variable dialog

Edit Variable dialog. Edit Variable dialog.

Variable

- Enter the environment variable name. You can use the drop-down list box to select from the most common environment variables used by scheduled tasks. Those include:

  HOME

- To be used instead of the default user's home folder.

MAILTO

- To send email output to an email address other than the user's default email address.

PATH

- To be used to search folders for program files.

SHELL

- To be used instead of the user's default value.

Value

- Enter the environment variable value.

Comment

- Enter a description for the environment variable, such as its purpose.

Enabled

- To enable or disable the variable, select or de-select Enabled.

OK

- Completes the setting of this variable.

Cancel

- Cancels the setting of this variable.

The environment variable is not actually set up until the `crontab` has been saved.

### Managing Environment Variables

As with creating new variables, changes to variables will not actually be made until the `crontab` is saved.

#### Cutting Environment Variables

To cut an environment variable, first select the variable to be cut. Then select Edit Cut .

Alternatively, you can use the right mouse button menu and choose Cut, or simply press Ctrl X.

#### Copying Environment Variables

To copy an environment variable, first select the variable to be copied. Then select Edit Copy .

Alternatively, you can use the right mouse button menu and choose Copy, or simply press Ctrl C.

#### Pasting Environment Variables

To paste an environment variable, first an environment variable must have already been cut or copied to the clipboard. Once an environment variable has been cut or copied, paste will be enabled. Then select the Variables folder. Finally, select Edit Paste .

Alternatively, you can use the right mouse button menu and choose Paste, or simply press Ctrl V.

#### Modifying Environment Variables

To modify an environment variable, first select the variable to be modified. Then select Edit Modify... . Alternatively, you can use the right mouse button menu and choose Modify..., or simply press Ctrl O. You will see the Edit Variable dialog, in which you would modify the variable as described above.

#### Deleting Environment Variables

To delete an environment variable, first select the variable to be deleted. Then select Edit Delete

Alternatively, you can use the right mouse button menu and choose Delete.

#### Enabling/Disabling Environment Variables

To enable or disabled an environment variable, first select the disabled variable. Disabled variables will have Disabled in their descriptions. Then select Edit Enabled .

Alternatively, you can use the right mouse button menu and choose Enabled. Confirm that the environment variable's name and value are correctly displayed.

### Saving the `crontab`

Once all scheduled tasks and environment variables have been created and/or properly modified, save the `crontab` by selecting File Save .

Alternatively, you can simply press &Ctrl;S. Additions or changes will not actually be made until this is done.

### Printing the `crontab`

To print the `crontab` as it has been saved, select File Print .

Printing the `crontab`. Printing the `crontab`.

The standard &kde; printer dialog will display. If you select Expand you will see that there are two extra &kcron; specific options in the Print Dialog box.

Print Crontab

- Prints the `crontab` for the current user.

Print All Users

- Prints the `crontab`s for all users. This option is enabled only for users with super-user privileges.

## Command Reference

### The main &kcron; window

#### The File Menu

&Ctrl;S File Save

- Saves changes to the `crontab`.

&Ctrl;P File Print...

- Prints the `crontab`.

&Ctrl;Q File Quit

- Quits &kcron;.

#### The Edit Menu

&Ctrl;X Edit Cut

- Cut the selected task or variable.

&Ctrl;C Edit Copy

- Copy the selected task or variable.

&Ctrl;V Edit Paste

- Paste a task or variable that has been cut or copied.

&Ctrl;N Edit New...

- Create a new task or variable.

&Ctrl;O Edit Modify...

- Modify the selected task or variable.

Edit Delete

- Delete the selected task or variable.

Edit Enabled

- Enable/disable the selected task or variable.

Edit Run Now

- Run the selected task now.

#### The Settings Menu

Settings Show Toolbar

- Displays toolbar.

Settings Show Statusbar

- Displays statusbar.

#### The Help Menu

&help.menu.documentation;

## Questions and Answers

Why aren't the changes I'm making to scheduled tasks and/or environment variables taking effect?

Additions or changes to scheduled tasks do not actually happen until the `crontab` has been saved.

## Credits and License

&kcron;

Program copyright 2000 Gary Meyer gary@meyer.net

Documentation copyright 2000 Morgan N. Sandquist morgan@pipeline.com

&underFDL; &underGPL;

## Installation

### How to obtain &kcron;

&install.intro.documentation;

### Requirements

In order to successfully compile &kcron;, you need the following libraries:

- `cron`, such as `vixie-cron`. &kcron; uses the `crontab` command to modify user's scheduled tasks.

- POSIX-compliant &UNIX;, such as provided by glibc. &kcron; uses some standard &UNIX; system calls for localization of dates and times

### Compilation and Installation

&install.compile.documentation;
&documentation.index;