mittwald API icon

mittwald API

Interact with the mittwald API

Actions125

Cronjob → Create

AI-generated

Summary

Create a new Cronjob within a specified project and app installation, configuring its schedule and execution details.

Inputs

  • Project — Select a project by list or by ID where the cronjob will be created.
  • App installation (required) — Specify the app installation associated with the cronjob, selectable by list or by ID.
  • Description (required) — Provide a textual description of the cronjob.
  • Interval (Cron Expression) (required) — Define the cron schedule using a cron expression to set when the job runs.
  • Active — Set whether the cronjob is active (enabled) or inactive (disabled). Defaults to true.
  • Timeout — Specify the maximum execution time in seconds before the cronjob times out. Default is 3600 seconds.
  • Email — Optional email address for notifications related to the cronjob execution.
  • Destination Type (required) — Choose the execution target type: either a shell command or an HTTP URL.
  • Interpreter (required) — When Destination Type is 'Shell Command', specify the interpreter executable path (e.g., /usr/bin/php).
  • Path (required) — When Destination Type is 'Shell Command', specify the path to the script or command to run.
  • Parameters — When Destination Type is 'Shell Command', provide additional command-line parameters.
  • URL (required) — When Destination Type is 'HTTP URL', specify the target URL to call at scheduled intervals.

Output shape

a single JSON object representing the created cronjob with its details

The output contains the created cronjob's data as returned by the Mittwald API; errors are reported according to the node's standard error handling.

Examples

Example 1: Create a shell-command cronjob

Creates a cronjob in a selected project and app installation with a cron schedule that runs a PHP script using /usr/bin/php interpreter, active by default.

Example 2: Create an HTTP URL triggered cronjob

Creates a cronjob in the selected project and app installation, configured to perform an HTTP call to a specified URL on a schedule, with customizable timeout and optional email notifications.

Links

Discussion