Skip to content

Scheduled Functions

Scheduled Functions allow you to execute your edge functions on a predetermined schedule. This enables automated tasks, periodic data updates, and scheduled maintenance operations without manual intervention.

To schedule an edge function:

  1. Navigate to “Compute > Scheduled Execution” in the QuantCDN dashboard
  2. Click “Create New Schedule”
  3. Select an existing edge function to schedule
  4. Configure the schedule settings

For convenience, we provide several preset schedules which you may select from the “Quick Schedule” dropdown menu.

For more precise control, use cron expressions. A cron expression consists of six required fields, separated by white space:

cron(Minutes Hours Day-of-month Month Day-of-week Year)
FieldValuesWildcards
Minutes0-59, - * /
Hours0-23, - * /
Day-of-month1-31, - * ? / L W
Month1-12 or JAN-DEC, - * /
Day-of-week1-7 or SUN-SAT, - * ? L #
Year1970-2199, - * /
  • 0 10 * * ? * - Run at 10:00 AM (UTC) every day
  • 15 12 * * ? * - Run at 12:15 PM (UTC) every day
  • 0 18 ? * MON-FRI * - Run at 6:00 PM (UTC) Monday through Friday
  • 0/15 * * * ? * - Run every 15 minutes
  • 0/5 8-17 ? * MON-FRI * - Run every 5 minutes Monday through Friday between 8:00 AM and 5:55 PM (UTC)

When setting up a scheduled function, you can configure how it will be triggered:

Choose the HTTP method for the scheduled execution:

  • GET
  • POST
  • PUT
  • DELETE

Define custom headers that will be sent with each execution. Common uses include:

  • Authentication tokens
  • API keys
  • Content-Type specifications

Example:

Authorization: Bearer your-token-here
Content-Type: application/json
X-Custom-Header: custom-value

For POST, PUT, or DELETE methods, specify the request body using key-value pairs. The data will be automatically formatted and sent to your function during execution.

Scheduled Functions are ideal for:

  • Periodic data synchronization
  • Regular cache invalidation
  • Automated report generation
  • Database maintenance
  • Content updates
  • Health checks
  • Automated backups
  • Data aggregation
  • Log rotation
  • Cleanup tasks

All scheduled executions are logged in the QuantCDN dashboard, where you can monitor:

  • Execution status
  • Response codes
  • Execution duration
  • Error messages
  • Last run time
  • Next scheduled run time