Breadcrumbs

Editing a Cron Job

Cron Job Data Sheet

Click on a cron job to open its data sheet:

open_job.png

The data sheet of a cron job consists of different areas:

job_data_sheet.png

(1) #Options

(2) Editable Settings

(3) Additional Information

(4) Error Logs (for details see page View Log Entries)

How to Edit a Cron Job

Options

In the navigation bar of the job data sheet you find different options:

cron_options.png

Option

Description

cron_back.png

Use this button to go back to the job list.

cron_save.png

If you want to save changes to the data sheet, click this button.

cron_deactivate.png

Use this button to deactivate the job.

cron_activate.png

Use this button to activate the job.

cron_reactivate.png

Click here if you want to reactivate the job.

cron_delete.png

If you want to delete the job, click this button.

Editable Settings

The following cron job settings can be edited after the cron job is created:

Pattern: You can enter a six-digit pattern. If you use only five digits, the seconds are omitted. The pattern defines the schedule of the job. Using the correct pattern, you can determine whether the job should be executed at fixed times, dates, or intervals.

edit_pattern.png

Formatting of the Pattern:

  • Separate the individual digits by spaces.

  • You can use * as a wildcard.

  • The following order applies to the input:

cron_pattern_formatting.png

Frequently Used Patterns

  • Every minute: * * * * *

  • Every second: * * * * * *

  • Every midnight: 0 0 * * *

  • All 15 seconds, but only on sundays: */15 * * * * 0

  • Every minute between 17:30 and 17:45: 30-45 17 * * *

  • Mondays to fridays at 01:20 and 01:30: 20,30 1 * * 1-5

Enter the appropriate service:

edit_service.png

Example: model-execution-service is used to execute EPC models.

Enter the name of the function:

edit_event.png

Example: executeModel is used if an EPC is to be executed.

The Activate job after saving field allows you to activate the job directly:

edit_activate.png
  • Choose option Activate to activate the job when it is created.

  • If you choose Don't activate (default), the job remains deactivated until you activate it manually (see page Editing a Cron Job for details).

The Execute job after saving field allows you to initiate the first execution of the job regardless of the pattern:

edit_execute.png
  • If you choose Execute, the job will be executed initially after its creation - regardless of the defined pattern. The second execution is then based on the pattern.

  • If you select Don't execute (default), the execution will be based directly on the pattern if the job is activated.

In this field you have to enter your service request. The Payload must contain a valid JSON:

edit_payload.png

Example:

{
    "modelId": "rp2562b60a-a4fe-4c97-b27a-43faa027d170",
    "pr": "e1e4c500-07b0-12e8-9cfa-7becc0a3e857"
}

Use the indicator on the lower right side of the frame to enlarge the payload field:

enlarge_payload.png

Don't forget to save your changes before you leave the data sheet.

Additional Information and Logs

The cron job data sheet also contains further details of the job in read-only mode.

Section Additional Information contains the meta information about the job such as:

additional_info.png
  • Status

  • Name

  • Last execution (date and time)

  • Creation date (date and time)

  • Modification date (date and time)

If the cron job does not run in an internal context, the section also shows further details of the user context:

additional_info_user.png
  • Internal context: No

  • User Context UUID

Section Error Logs allows the user to search the logs of the cron job. See page View Log Entries for further details:

edit_error_logs.png
Related Pages: