Skip to main content
Skip table of contents

Creating a Cron Job

If you create a new job, an empty cron job data sheet opens:

cron_create_new_job.png

The data sheet contains the basic data of a cron job:

  • Name

  • Pattern

  • Internal Context

  • Service

  • Event

  • Activate Job After Saving

  • Execute Job After Saving

  • Payload

How to Create a Cron Job

To create a new cron job, click Plus on the cron manager start page:

press_create_icon.png

An empty cron job data sheet opens:

cron_create_new_job.png

Field

Description

Name

Enter a name for the job.

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.

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

Internal Context

Available options are Yes and No (default):

  • If you keep the default No, the job will be executed in the user context of the logged-in user.

  • If you choose Yes, the job will be executed in the internal context without user data.

Service

Open the drop-down list to select the appropriate service.

Scheer PAS Cron Manager can address platform services only. Customer-specific services are currently not supported.

Event

Open the drop-down list to select the appropriate event. The list shows all events that are available in the selected service.

Activate Job After Saving

The field allows you to activate the job directly:

  • 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 (refer to Editing a Cron Job for details).

Execute Job After Saving

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

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

Payload

Enter your service request in the editor. The payload must contain a valid JSON. The editor supports you to insert valid JSON:

cron_payload.png
  • Click Format to format your input with proper intendation and line feeds (default).

  • Click Compact to remove all whitespaces and show compact JSON data.

  • Click Undo to undo your last action in the editor.

  • Click Redo to redo your last action in the editor.

The editor displays erroneous input:

payload_errors.png
  • Hover over Error in front of the line number to display a hint for the errors in this line.

  • Click Error in the footer to parse all errors. The result will be shown in the footer.

If you have completed your input, create the cron job:

new_job_form_filled.png

Your cron job is created and added to the job list. The job is displayed with a blue frame if you activated it:

job_blue.png

Use option Deactivate job to deactivate it:

deactivate_job.png

A grey frame indicates that the job is not activated:

job_grey.png

Use option Activate job to activate it:

activate_job.png
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.