Defining Jobs

If you are a superuser, you can create a new job by clicking on the button New on the view page of a job or in the Jobs section. The Content Management Server displays the Configuration Management – Jobs – Create form:

The form is divided into the areas General Properties, Execution and Script, which are described in the following.

General Properties

You determine the general properties of the job in the first section of the form:

Name

Enter here the name of the Job. In order to prevent conflicts with system job names, the name must neither start with system nor with an underscore character. Furthermore, the usual rules for names apply (no special characters, only the characters 0 to 9, A to Z, a to z, and the underscore are allowed).

Active

Using this option, you can determine whether a job is to be usable, i. e. can be placed in the queue. If you do not want to use the job, deselect this option to deactivate the job.

Title

Enter the title of the new job in this entry field. Please note that the title of a job can have a maximum length of 250 characters including all character transformations (from, for example, ANSI to UTF-8).

Comment

Enter an as meaningful description of the new job as possible in this entry field. The description of a job also can have a maximum length of 250 characters including all character transformations (from, for example, ANSI to UTF-8).

Execution

In the second area of the form, you can determine under which login the job script will be executed and which global permission is required to be able to execute or cancel the job. Furthermore, here you can define the job’s execution schedule:

Execution Login

Enter the login name of the user under whose login the job script is to be executed in this field. If you leave the entry field empty, the Content Management Server uses as the execution login the login name of the current user when the job is saved.

If you do not know the login name of the user under whose name the job script is to be executed, click on the Browse button. A selection page for users is displayed. You can limit the search from the start by entering a part of a user’s name in the entry field and afterwards clicking on the Search button. On the selection page you can start a new search at any time to find the desired user. When you click on the login of the desired user in the corresponding list entry, the login name is moved to the Login, under which the script will be executed field.

Execution Permission

From the Execution Permission popup menu, select the global permission the user needs to start the job, i.e. to place it in the queue, or to cancel the job. If you do not enter a global permission, the job can be executed by all users.

Schedule

A job’s schedule determines when the job is executed. New jobs initially do not have a schedule. However, you can create one by clicking the Create schedule button.

Script

In the third area of the form, you can determine which Tcl script is to be run when the job is executed. Enter the Tcl code in the entry field:

Please note that the execution result can be set by assigning a value to the result variable. If you want the Tcl script to output data, please do not write to the standard output device. Instead, call the writeToJobLog procedure and pass to it the string to be output as the only argument.

Click on OK to conclude the job definition. The Content Management Server then displays the view page of the new job.