Schedules
Platform

Schedules

Automate agent execution with cron schedules, webhooks, events, and Slack triggers. Create, manage, and monitor triggers from the dashboard or API.

Schedules let you run agents automatically. Define when and how an agent should fire, and JuhJuh handles the rest. Four trigger types cover most automation patterns: cron schedules for recurring work, webhooks for external systems, events for internal state changes, and Slack mentions for team-driven activation.

Every trigger logs its executions, tracks success and failure rates, and can be toggled on or off without deleting the configuration.

Trigger types

Schedule (cron)

Cron triggers fire agents on a recurring cadence. You provide a standard 5-field cron expression and a timezone. JuhJuh evaluates the expression every minute and fires matching triggers exactly once per matching minute.

Cron format: minute hour day month weekday

Field Values Special characters
Minute 0-59 *, ,, -, /
Hour 0-23 *, ,, -, /
Day of month 1-31 *, ,, -, /
Month 1-12 *, ,, -, /
Day of week 0-7 (0 and 7 are Sunday) *, ,, -, /

Examples:

Expression Meaning
0 9 * * 1-5 Every weekday at 9:00 AM
*/15 * * * * Every 15 minutes
0 0 1 * * First day of every month at midnight
30 17 * * 5 Every Friday at 5:30 PM

JuhJuh prevents double-firing by tracking the last trigger time per minute. If the evaluator runs twice within the same minute, the second run is skipped.

Webhook

Webhook triggers fire when an external system sends an HTTP POST to a unique URL. Each webhook trigger gets its own path segment and an optional HMAC-SHA256 secret for signature verification.

When you create a webhook trigger, JuhJuh generates: - A unique URL path (e.g., https://yourdomain.com/webhooks/inbound/<path>/) - A signing secret for HMAC verification (if your sender supports it)

The sender includes the signature in the X-Webhook-Signature header using the format sha256=<hex_digest>. JuhJuh verifies the signature against the raw request body before firing the trigger.

Webhook payloads are sanitized before storage: values are truncated at 500 characters, nested objects are limited to 3 levels deep, and each object is capped at 20 keys.

Event

Event triggers fire when something happens inside JuhJuh. Four event types are available:

Event type Fires when
Ticket Created A new ticket is created in the organization
Ticket Status Changed A ticket's status changes (e.g., from Open to In Progress)
Ticket Assigned A ticket is assigned to a team member
Ticket Commented A comment is added to a ticket

Each event trigger can include a filter. Filters use simple key-value matching: all keys in the filter must be present in the event data with matching values. For example, a filter of {"project_key": "ACME"} only fires for events in the ACME project.

Slack mention

Slack mention triggers fire when someone mentions a keyword or phrase in a connected Slack channel. You specify the channel to monitor (or leave it blank to match all channels). The trigger can also include an event filter to match specific text patterns.

See Slack integration for how to connect your workspace.

Creating a trigger

  1. Go to Schedules in the sidebar
  2. Fill in the New Trigger form at the top of the page:
  3. Select the Agent to trigger
  4. Enter a Name for the trigger
  5. Choose the Trigger type
  6. Complete the type-specific fields:
  7. Schedule: enter a cron expression and timezone
  8. Webhook: the URL and secret are generated automatically
  9. Event: select the event type
  10. Slack Mention: enter the Slack channel ID
  11. Click Create

The trigger is active immediately. It appears in the trigger list below the form.

Managing triggers

The schedules page shows all triggers across your organization. Filter by trigger type or agent using the tabs and dropdown at the top.

Each trigger in the list shows: - Name and type - Linked agent - Active/inactive status - Last triggered time - Total trigger count

Editing

Click Edit on any trigger to modify its name, type-specific fields, or active state. Changes take effect immediately.

Toggling

Click the toggle button to enable or disable a trigger without deleting it. Disabled triggers keep their configuration and logs intact but stop firing.

Deleting

Click Delete to permanently remove a trigger and all its execution logs.

Execution logs

Each trigger maintains an execution log. Click Logs on any trigger to see recent executions.

Log entries include:

Field Description
Status Success, Failed, or Skipped
Duration Time to dispatch the agent execution (milliseconds)
Event data The sanitized payload that caused the trigger to fire
Error message Reason for failure, if applicable
Timestamp When the execution occurred

Logs are ordered newest first. The dashboard shows the 50 most recent entries per trigger.

API

The REST API provides full CRUD access to schedules. All endpoints are scoped to your organization.

Method Path Description
GET /api/v1/orgs/{slug}/schedules/ List all triggers
POST /api/v1/orgs/{slug}/schedules/ Create a trigger
GET /api/v1/orgs/{slug}/schedules/{id}/ Get trigger details
PATCH /api/v1/orgs/{slug}/schedules/{id}/ Update a trigger
DELETE /api/v1/orgs/{slug}/schedules/{id}/ Deactivate a trigger
POST /api/v1/orgs/{slug}/schedules/{id}/toggle/ Toggle active state
GET /api/v1/orgs/{slug}/schedules/{id}/logs/ List execution logs
GET /api/v1/orgs/{slug}/schedules/{id}/logs/{log_id}/ Get a specific log entry

Filtering

The list endpoint accepts query parameters:

Parameter Description
trigger_type Filter by type: SCHEDULE, WEBHOOK, EVENT, SLACK_MENTION
is_active Filter by active state: true or false
agent_id Filter by agent UUID
q Search by trigger name

Creating via API

json POST /api/v1/orgs/acme-engineering/schedules/ { "name": "Nightly code scan", "agent_id": "a1b2c3d4-...", "trigger_type": "SCHEDULE", "cron_expression": "0 2 * * *", "timezone": "America/New_York" }

For webhook triggers, the webhook_path and webhook_secret fields are auto-generated on creation and returned in the response.

Log filtering

The logs endpoint accepts:

Parameter Description
status Filter by status: SUCCESS, FAILED, SKIPPED
created_after ISO 8601 datetime lower bound
created_before ISO 8601 datetime upper bound

Permissions

Creating, editing, and deleting triggers requires the Manage scheduled tasks permission. Organization Owners and Admins have this permission by default.

Common patterns

Nightly code quality scan. Create a cron trigger at 0 2 * * * linked to an autonomous agent with code analysis instructions. The agent runs every night at 2 AM, opens tickets for any issues, and posts a summary to Slack.

PR merge deployment. Set up a webhook trigger connected to your CI pipeline. When a PR merges, the CI system sends a POST to the webhook URL. The triggered agent handles staging deployment, runs migrations, and verifies health checks.

Ticket triage on creation. Use a Ticket Created event trigger filtered to a specific project. When a new ticket lands, the agent auto-classifies it, assigns priority, and routes it to the right team.

On-call responder via Slack. Configure a Slack mention trigger monitoring your incident channel. When someone mentions the trigger keyword, the agent joins the conversation with diagnostic context from connected resources.

  • Agents for creating and configuring the agents that triggers activate
  • Agent Pipelines for chaining multiple agents in execution flows
  • API for the full REST API reference including schedule endpoints
  • Slack for connecting your workspace and using Slack mention triggers
  • Permissions for controlling who can manage schedules
  • Automation for broader workflow automation beyond triggers