LanternDOCS

Scheduling

Lantern agents can be scheduled to run automatically on a recurring basis using cron expressions. You can also configure agents to deliver results via email or webhooks after each run.

Cron expressions

Schedules use standard cron syntax with five fields:

# ┌─── minute (0-59)
# │ ┌─── hour (0-23)
# │ │ ┌─── day of month (1-31)
# │ │ │ ┌─── month (1-12)
# │ │ │ │ ┌─── day of week (0-6, Sun=0)
# │ │ │ │ │
# * * * * *

# Examples:
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 8 * * 1     # Every Monday at 8:30 AM

Setting up a schedule

  1. Open the agent's detail page in the dashboard
  2. Go to the Schedule tab
  3. Enter a cron expression or use the visual schedule builder
  4. Optionally set the input payload for each scheduled run
  5. Click Save schedule

[Screenshot: Schedule configuration with cron builder]

AI-assisted cron

Not sure about cron syntax? Describe your schedule in plain English and Lantern will generate the cron expression for you:

"Every weekday at 9am"          → 0 9 * * 1-5
"Every 2 hours during business"  → 0 */2 9-17 * * 1-5
"First Monday of each month"     → 0 9 1-7 * 1

In the schedule builder, click Describe in English, type your desired schedule, and the AI will generate the cron expression. You can review and adjust before saving.

Tip: The schedule builder shows a preview of the next 5 scheduled runs so you can verify the schedule is correct before saving.

Email delivery

Agents can email their results after each scheduled run. This is useful for daily digests, reports, and monitoring alerts.

  1. On the Schedule tab, enable Email delivery
  2. Enter one or more recipient email addresses
  3. Choose a delivery format: Plain text, HTML, or Markdown
  4. Optionally customize the email subject template
# Subject template variables:
{agent_name}    → "research-agent"
{run_date}      → "2026-04-12"
{run_status}    → "completed"

# Example subject:
"[{agent_name}] Daily report - {run_date}"
Note: Email delivery requires a configured email connector (SMTP or Gmail). See Connectors for setup instructions.

Webhook triggers

In addition to cron-based scheduling, agents can be triggered by external webhooks. This is useful for event-driven workflows:

  • GitHub webhooks -- trigger on push, PR, or issue events
  • Stripe webhooks -- trigger on payment or subscription events
  • Custom webhooks -- trigger from any HTTP POST

Each agent has a unique webhook URL:

POST https://api.lantern.run/v1/agents/my-agent/webhook
Content-Type: application/json
X-Lantern-Secret: your-webhook-secret

{
  "event": "push",
  "repository": "org/repo",
  "ref": "refs/heads/main"
}

The webhook payload is passed as the agent's input. You can configure the webhook secret in the agent's Configuration tab.

Schedule management

From the dashboard, you can manage all scheduled agents in one place:

  • Pause/resume -- temporarily stop a schedule without deleting it
  • Run history -- view all past scheduled runs with status and timing
  • Next run -- see when the next scheduled execution will happen
  • Manual trigger -- run a scheduled agent on demand outside its schedule

Timezone handling

Schedules default to UTC. You can set a timezone per schedule:

{
  "cron": "0 9 * * 1-5",
  "timezone": "America/New_York"
}

The scheduler automatically handles daylight saving time transitions.

Warning: Be careful with schedules that run more frequently than every 5 minutes. Each run consumes compute resources and LLM tokens. Monitor your usage in the dashboard.