QStash · Example Payload

Create Schedule

Example showing how to create a schedule that fires every weekday at 9am UTC

Message QueueTask SchedulingServerlessHTTP MessagingBackground JobsWebhooksDead Letter QueueCRONUpstash

Create Schedule is an example object payload from QStash, with 4 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

titledescriptionrequestresponse

Example Payload

Raw ↑
{
  "title": "Create a CRON Schedule",
  "description": "Example showing how to create a schedule that fires every weekday at 9am UTC",
  "request": {
    "method": "POST",
    "url": "https://qstash.upstash.io/v2/schedules/https://example.com/daily-job",
    "headers": {
      "Authorization": "Bearer <QSTASH_TOKEN>",
      "Content-Type": "application/json",
      "Upstash-Cron": "0 9 * * 1-5",
      "Upstash-Retries": "2"
    },
    "body": {
      "job": "daily-report",
      "type": "summary"
    }
  },
  "response": {
    "status": 200,
    "body": {
      "scheduleId": "scd_2XavMmRcJHJf7HkNtNqjfVf8uQe"
    }
  }
}