Job

A Job is a definition for triggering a task under certain conditions, such as a recurring schedule or a webhook event. It contains a trigger, which defines the triggering conditions, and an action, which performs the task.

Org admins can define Jobs for org-level automations, and every member can define their own Jobs to automate personal tasks. See Automation for how Jobs are used.

Trigger

The Trigger defines the conditions under which a Job starts an execution. The following triggers are currently supported:

Recurring Schedules

The standard crontab format is used to define when the Job executes. For example:

spec:
  trigger:
    recurring:
      schedules:
      - cron: '0 1 * * 1-5'  # at 1am on working days
      - cron: '0 20 * * 1-5' # also at 8pm on working days

The actual scheduling granularity can be managed at the org level, as minute-level granularity is often unnecessary.

Webhook Events

A Webhook must be defined at the org level (by an org admin), and its URL registered with the service that generates the events. A Job can then be defined to be triggered whenever a request is posted to the webhook:

spec:
  trigger:
    webhook:
      ref:
        name: WEBHOOK-NAME

Action

The Action defines how the Job is executed when triggered. For example:

spec:
  action:
    llm_session:
      prompt: |
        ...
      context:
        agent: pr-review

This starts the pr-review AI agent to handle the webhook event, e.g. a GitHub pull request event.

See Also