Outcron Plain HTML

Jobs

A job defines a unit of work that Outcron executes on a schedule or on demand. Every job has a type, a configuration, and execution settings that control timeout and retry behavior.

Job Types

HTTP

Makes an HTTP request to a URL. This is the most common job type.

FieldRequiredDefaultDescription
urlYesThe target URL
methodNoGETHTTP method (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS)
bodyNoRequest body (for POST, PUT, PATCH)
headersNoKey-value map of HTTP headers
success_status_policyNodefaultSuccess policy. default treats 200-299 as success; custom uses success_statuses
success_statusesNoCustom-only comma-separated success status codes or ranges, such as 200,201,202,204 or 200-204
retry_on_statusesNoExplicit comma-separated HTTP status codes that trigger a retry, such as 429,502,503

An HTTP job succeeds when the response status code is 200-299 by default. Redirects, other non-2xx statuses, response body read errors, and network/policy failures are recorded as failures. Use success_status_policy=custom with success_statuses when a job needs a different explicit success set. Request bodies are capped at 1 MiB. Headers and bodies are encrypted at rest and redacted where execution snapshots or audit-style surfaces would otherwise expose them.

Health Check

Monitors the availability of a URL by checking its response status code.

FieldRequiredDefaultDescription
urlYesThe URL to check
expected_statusNo200Expected HTTP status code

A health check succeeds when the response matches the expected status code.

Container

Runs a command inside a container image.

FieldRequiredDefaultDescription
imageYesContainer image (e.g., alpine:latest)
commandNoCommand to run (string or array). Strings are wrapped in /bin/sh -c.
envNoEnvironment variables as a key-value map; keys must match ^[A-Za-z_][A-Za-z0-9_]*$
registry_credential_idNoID of a registry credential for private image pulls

A container job succeeds when the process exits with code 0.

Container jobs require a Docker or Podman runtime available to the executor host. Container-backed job types use hardened defaults: all Linux capabilities dropped, no-new-privileges, resource limits, read-only rootfs with writable /tmp, non-root execution by default, and network isolation with private-range egress blocks.

Script

Runs an inline script in a language-specific container.

FieldRequiredDefaultDescription
languageYesScript language: built-in python, nodejs, bash, go, or ruby, plus any platform-configured additions
scriptYesThe script source code to execute
requirementsNoPackage dependencies (pip packages for Python, npm packages for Node.js)
envNoEnvironment variables as a key-value map; keys must match ^[A-Za-z_][A-Za-z0-9_]*$ and cannot use reserved runtime names
secret_envNoEncrypted environment variables (redacted in execution snapshots); keys use the same env-name and reserved-name rules

Each language uses a dedicated container image with the runtime pre-installed. Platform admins can add custom script languages only when they also configure the image for that language. A script job succeeds when the script exits with code 0.

Inline script source is capped at 256 KiB. Requirements should be package specifiers, not installer flags; pin versions for repeatable runs. Runtime entrypoints reject invalid env names and reserved names such as OUTCRON_CONFIG; Go scripts also reserve GOCACHE and GOPATH.

Database

Executes a query or maintenance action against a database.

FieldRequiredDefaultDescription
db_typeYesDatabase type: postgres, mysql, mongodb, or redis
hostNoDatabase hostname (required unless connection_string is set)
portNoper db_typeDatabase port
databaseNoDatabase or schema name
usernameNoDatabase username
passwordNoDatabase password (encrypted)
connection_stringNoFull connection URI (encrypted, alternative to individual fields)
scriptNoSQL or query script to execute (one of script or action_template is required)
action_templateNoPredefined maintenance action (e.g., backup, vacuum, reindex for Postgres; backup, optimize for MySQL)
max_rowsNo1000Maximum number of rows returned in results
tls_modeNodisableTLS mode: disable, require, verify-ca, or verify-full
tls_ca_certNoPEM CA certificate for verify-ca or verify-full

A database job succeeds when the query or action completes without error.

Use either individual connection fields with password or a connection_string. Use either script or an action_template. max_rows defaults to 1000 and is capped by the deployment's platform setting.

Cloud CLI

Runs a cloud provider CLI command in a container.

FieldRequiredDefaultDescription
toolYesCLI tool: built-in aws, gcloud, az, kubectl, or terraform, plus any platform-configured additions
commandNoRaw CLI command to execute (one of command or template is required)
templateNoTemplated command with parameter substitution
parametersNoKey-value map of parameters (injected as environment variables); keys must match ^[A-Za-z_][A-Za-z0-9_]*$ and cannot shadow provider credential names
credentialsNoCloud provider credentials (encrypted, string or JSON object)

A cloud CLI job succeeds when the command exits with code 0.

Provide exactly one of command or template; command/template strings are capped at 16 KiB. Parameters are injected as environment variables and cannot shadow provider credential env names.

Cloud Function

Invokes a serverless function on a cloud provider.

FieldRequiredDefaultDescription
providerYesCloud provider: built-in aws, gcp, or azure, plus any platform-configured additions
function_idYesFunction identifier (ARN, name, or resource ID)
payloadNoJSON payload to pass to the function
invocation_typeNosyncInvocation mode: sync (wait for result) or async (fire-and-forget)
regionNoCloud region
credentialsNoCloud provider credentials (encrypted, string or JSON object)

A cloud function job succeeds when the invocation completes without error.

Payloads must be valid JSON strings. sync waits for the provider invocation result; async submits the invocation and returns after the provider accepts it.

Git Workflow

Clones a git repository and executes a script from within it.

FieldRequiredDefaultDescription
repo_urlYesGit repository URL
script_pathYesRelative path to the script within the repo (no .. allowed)
branchNomainBranch to check out
subdirNoSubdirectory to change to before running the script
argsNoArguments to pass to the script (string array)
authNoGit authentication (provide token or ssh_key, not both)
envNoEnvironment variables as a key-value map; keys must match ^[A-Za-z_][A-Za-z0-9_]*$ and cannot use git workflow control names
secret_envNoEncrypted environment variables (redacted in execution snapshots); keys use the same env-name and reserved-name rules
clone_timeout_secNo60Timeout for the git clone step in seconds (1–3600).

A git workflow job succeeds when the script exits with code 0.

Use either token auth or SSH-key auth, not both. SSH flows can pin known hosts. Paths must be relative and stay inside the clone; args are bounded, and clone_timeout_sec only bounds the clone step.

IaC Drift

Detects infrastructure drift by running a plan or preview against a live environment.

FieldRequiredDefaultDescription
iac_typeYesIaC tool: built-in terraform or pulumi, plus any platform-configured additions
repo_urlYesGit repository URL containing the IaC configuration
branchNomainBranch to check out
working_dirNoWorking directory within the repo (relative path)
commandNoCustom plan/preview command override
authNoGit authentication (provide token or ssh_key, not both)
credentialsNoCloud provider credentials for drift detection (encrypted)

An IaC drift job succeeds when the plan/preview command completes. The output includes structured drift detection status. Custom command first verbs are restricted by platform policy; mutating verbs remain policy-sensitive when allowed.

ETL

Extracts data from a source, optionally transforms it, and loads it into a destination.

FieldRequiredDefaultDescription
source_typeYesSource type: postgres, mysql, api, or file
source_configYesSource connection details (see below)
dest_typeYesDestination type: postgres, mysql, api, or file
dest_configYesDestination connection details (see below)
transform_scriptNoTransformation logic applied between extract and load
mapping_rulesNoField mapping rules as a JSON object

Source/destination config for database types (postgres, mysql):

FieldDescription
hostDatabase hostname
portDatabase port
databaseDatabase name
usernameUsername
passwordPassword (encrypted)
tls_modeOptional TLS mode
tls_ca_certOptional CA certificate (encrypted)
querySQL query (source only)
tableTarget table (destination only)

Source/destination config for API type:

FieldDescription
urlAPI endpoint URL
api_keyAPI key (encrypted)

Destination mode (in dest_config):

ValueDescription
appendInsert new rows (default)
replaceReplace all existing data
upsertInsert or update based on key

An ETL job succeeds when the full extract-transform-load pipeline completes without error.

mapping_rules must be a string-to-string object. Source credentials are only available to extract, destination credentials only to load, and transform_script runs in a separate transform stage without source or destination credentials.

Container Security

Most jobs require the executor container capability and run in a container behind the scenes. The registered exceptions are http and healthcheck; all other job types are container-backed: container, script, database, cloud-cli, cloud-function, git-workflow, iac-drift, and etl. The containers run with security hardening. Keep these details in mind as you plan your use of Outcron.

Execution Settings

These settings apply to all job types:

FieldDefaultDescription
timeout_sec30Maximum execution time in seconds. Must be between 1 and platform job_execution_timeout_max (default 3600, hard cap 86400). The execution is marked as timeout if exceeded.
retry_count0Number of times to retry on failure. Must be no greater than platform job_retry_count_max (default 10).
retry_delay_sec5Seconds to wait between retry attempts. With retries enabled, explicit nonzero values must be at least platform job_retry_delay_min_sec (default 1).
no_overlapfalsePrevents a new run while another execution for the same job is pending, claimed, or running.

timeout_sec must be between 1 and platform job_execution_timeout_max. retry_count and retry_delay_sec must be non-negative integers. The combined retry workload budget (timeout_sec * (retry_count + 1)) + (retry_delay_sec * retry_count) must be no greater than platform job_retry_total_budget_max_sec (default 7200).

Retry Behavior

When a job fails and has retry_count > 0, Outcron retries automatically inside the same running execution row:

  1. The failed attempt records its result, but the execution stays running while another retry is eligible.
  2. After retry_delay_sec, the next attempt starts in that same execution.
  3. Each attempt increments the attempt counter in place.
  4. The execution receives a terminal status only after success, a non-retriable result, cancellation or interruption, timeout, or the final failed attempt.

For HTTP jobs, you can use retry_on_statuses to retry on configured status codes such as 429 or 5xx provider failures. The CLI accepts aws and gcp shortcuts and expands them into explicit status-code lists before sending the API request. This is separate from success_status_policy, which decides whether the HTTP response is successful before retry eligibility is evaluated.

No-Overlap Runs

Enable no_overlap when a job must not run concurrently with itself. While an execution for that job is pending, claimed, or running, scheduled runs are skipped and manual triggers return a conflict response. This is useful for migrations, ETL loads, and other workflows that are not safe to overlap.

Job Lifecycle

Deleting a job is permanent. Existing execution history for a deleted job is retained.