The Kcron Handbook

The Kcron Handbook

The Kcron Handbook

Morgan N. Sandquist

Developer: Gary Meyer

Reviewer: Lauri Watts

Revision 3.00.00

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

Kcron is an application that schedules programs to be run.


Chapter 1. Introduction

Introduction

Chapter 1. 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.

KDE Logo
Chapter 2. Using Kcron

Using Kcron

Chapter 2. Using Kcron

Important

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.

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
Adding Scheduled Tasks

Adding Scheduled Tasks

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
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, press 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 sheduled.

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.

KDE Logo
Managing Scheduled Tasks

Managing Scheduled Tasks

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, which you would modify 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 diabled 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.

KDE Logo
Adding Environment Variables

Adding Environment Variables

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.
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 directory.

MAILTO

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

PATH

To be used to search directories 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.

KDE Logo
Managing Environment Variables

Managing Environment Variables

Managing Environment Variables

Note

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 environemnt 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, which you would modify 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 diabled 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.

KDE Logo
Saving the crontab

Saving the crontab

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.

KDE Logo
Printing the crontab

Printing the crontab

Printing the crontab

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

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 crontabs for all users. This option is enabled only for users with super-user privileges.

KDE Logo
KDE Logo
Chapter 3. Command Reference

Command Reference

Chapter 3. Command Reference

The main Kcron window

The File Menu

File->Save (Ctrl+S)

Saves changes to the crontab.

File->Print...

Prints the crontab.

File->Quit (Ctrl+Q)

Quits Kcron.

The Edit Menu

Edit->Cut (Ctrl+X)

Cut the selected task or variable.

Edit->Copy (Ctrl+C)

Copy the selected task or variable.

Edit->Paste (Ctrl+V)

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

Edit->New... (Ctrl+N)

Create a new task or variable.

Edit->Modify... (Ctrl+O)

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 Options Menu

Options->Show Toolbar

Displays toolbar.

Options->Show Statusbar

Displays statusbar.

The Help Menu

Help->Contents... (F1)

Invokes the KDE Help system starting at the Kcron help pages. (this document).

Help->What's This? (Shift+F1)

Changes the mouse cursor to a combination arrow and question mark. Clicking on items within Kcron will open a help window (if one exists for the particular item) explaining the item's function.

Help->Report Bug...

Opens the Bug report dialog where you can report a bug or request a “wishlist” feature.

Help->About Kcron

This will display version and author information.

Help->About KDE

This displays the KDE version and other basic information.

KDE Logo
Chapter 4. Questions and Answers

Questions and Answers

Chapter 4. Questions and Answers

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

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.

KDE Logo
Chapter 5. Credits and License

Credits and License

Chapter 5. Credits and License

Kcron

Program copyright 2000 Gary Meyer <gary@meyer.net>

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

This documentation is licensed under the terms of the GNU Free Documentation License.

This program is licensed under the terms of the GNU General Public License.

KDE Logo
Appendix A. Installation

Installation

Appendix A. Installation

How to obtain Kcron

Kcron is part of the KDE project http://www.kde.org/.

Kcron can be found in the kdeadmin package on ftp://ftp.kde.org/pub/kde/, the main FTP site of the KDE project.

Requirements

Requirements

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

KDE Logo
Compilation and Installation

Compilation and Installation

Compilation and Installation

In order to compile and install Kcron on your system, type the following in the base directory of the Kcron distribution:

% ./configure
% make
% make install

Since Kcron uses autoconf and automake you should have no trouble compiling it. Should you run into problems please report them to the KDE mailing lists.

KDE Logo
KDE Logo
KDE Logo