Jobs

Cron jobs in the CRM

Recurring tasks (cron jobs) can be executed at a specific time. The commands to be executed are saved in a user-specific table, the so-called cron job table (crontab). With JustRelate CRM, jobs are used for various tasks. Primarily, they are used for time-controlled functions and workflows within the system. Also, the system uses jobs to control synchronization processes.

You can open the Job form via the Administration/Tools/Jobs menu.

In the form, you can specify the Class within the application JARs to be called by the job, as well as a method that is exe­cuted within the class. The tooltips in the field titles of the form indicate the conventions the entries follow.

Furthermore, a job can process dynamic Java that can be provided instead of the class, and likewise with a method and the required parameters.

The methods are defined in the system. Using the Check method function, you can have the system check the entry in the Method field for existence.

Job status

In the Identifier field, the respective status (active, inactive) of the job is indicated by an icon.

  • Red X = job is not started, and no processes are initiated.
  • Running man = job is active and waits for the next process.

If a job is inactive, it can be activated using the Start function. When the next defined time is reached, the job goes through the specified process. If a job is active, it can be stopped, however, run­ning procedures are completed first.

Further attributes

The Active flag provides for the fact that all active cron jobs are started at the start of the server. They are ready to run when they are due.

The flags Execute immediately and Execute missed specify how the job is processed at the server start. Execute missed helps to "make up" for procedures that would have been due while the system was deactivated, for example.

User: The job can be declared as user-specific if, e.g., user-spe­cific environment variables were defined. If the field is empty, the session is opened under the user GLOBAL (global session).

Group: This lets you specify for which server the job is to be exe­cuted. It is particularly important when using multiple application servers. What needs to be entered, can be found in the properties file for the server under the "psa.job.grp" parameter.

Crontab and mode

Here, you can specify the values that determine when and at which intervals the job should run.

Entries in the fields can be separated by a comma and are OR-linked within a field. Across the fields, the entries are linked with AND.

Example:

Minu­tes

Hours

Days

Months

Days of the week

15

23

*

*

1-5,7

* = no check

The above causes the job to start at 11:15 p.m. on every workday (Monday to Friday [1-5]) and Sunday (7), but not on Saturday.

One can retrace the entries using the Show next runtimes function. In the overview, you will then see the next ten runs.

The conventions comply with the Linux guidelines. Further conventions can be found in the web (e.g., at wikibooks.org).

The Crontab is used only for the Mode CRON. Additionally, special modes like, for example, SINGLE can be used for a one-time run at server start and manual calls for testing. The procedures of the jobs are executed only on the server, there is no client connection.