Skip to main content
Yboard Schedules let you run functions on a cron-based schedule, powered by pg_cron.

Overview

Schedules trigger your Functions at specified intervals — useful for recurring tasks like data cleanup, report generation, and external API syncing.

Technology Stack

How It Works

  1. Create a function to run on schedule
  2. Define a cron expression for the timing
  3. Yboard registers the schedule with pg_cron
  4. The function is invoked automatically at each interval

Execution Flow

  1. pg_cron fires at the scheduled time
  2. PostgreSQL trigger calls the function endpoint
  3. Function executes with admin-level access
  4. Results are logged for monitoring

Cron Expressions

Standard cron syntax with 5 fields:

Common Patterns

Secret Management

Scheduled functions can access secrets configured in your project. Use them for API keys, database URLs, and other sensitive values.

Best Practices

  1. Keep schedules idempotent — Functions should be safe to re-run
  2. Use appropriate intervals — Don’t schedule more frequently than needed
  3. Add error handling — Log failures for debugging
  4. Monitor execution — Check logs regularly for issues

Limitations

  • Minimum interval is 1 minute
  • Maximum execution time follows function limits (30 seconds)
  • All times are in UTC