curl --location --request POST 'https://scheduler.booper.dev/api/jobs' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer sk_public_20230921' \
--data-raw '{
"method": "post",
"url": "https://scheduler.booper.dev/api/broadcast",
"body": {"content": "Testing 123", "channel": "discord"},
"schedule_in": [30, "seconds"]
}'
npx @booper/cli run \
POST https://scheduler.booper.dev/api/broadcast \
--data 'content=Testing 123' \
--data 'channel=discord' \
--in '30 seconds'
{
"data": {
"id": "41d7f28b-dfbe-44b8-b716-b91898bb0ce0",
"idempotency_key": null,
"inserted_at": "2023-09-01T18:25:49",
"name": null,
"description": null,
"user_id": "bd2aa099-6eb7-4dbb-9178-32141def1355",
"schedule_id": null,
"job_id": 29180,
"job": {
"attempted_at": null,
"cancelled_at": null,
"completed_at": null,
"discarded_at": null,
"has_confict": false,
"id": 29180,
"inserted_at": "2023-09-01T18:25:49.705161Z",
"scheduled_at": "2023-09-01T18:26:19.707539Z",
"state": "available"
},
"args": {
"body": {
"author": "alex",
"content": "Hello world!"
},
"headers": {},
"method": "post",
"schedule_in": [30, "seconds"],
"url": "https://scheduler.booper.dev/api/channels/discord"
}
}
}
Jobs
Create Job
This endpoint creates a new job
POST
/
api
/
jobs
curl --location --request POST 'https://scheduler.booper.dev/api/jobs' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer sk_public_20230921' \
--data-raw '{
"method": "post",
"url": "https://scheduler.booper.dev/api/broadcast",
"body": {"content": "Testing 123", "channel": "discord"},
"schedule_in": [30, "seconds"]
}'
npx @booper/cli run \
POST https://scheduler.booper.dev/api/broadcast \
--data 'content=Testing 123' \
--data 'channel=discord' \
--in '30 seconds'
{
"data": {
"id": "41d7f28b-dfbe-44b8-b716-b91898bb0ce0",
"idempotency_key": null,
"inserted_at": "2023-09-01T18:25:49",
"name": null,
"description": null,
"user_id": "bd2aa099-6eb7-4dbb-9178-32141def1355",
"schedule_id": null,
"job_id": 29180,
"job": {
"attempted_at": null,
"cancelled_at": null,
"completed_at": null,
"discarded_at": null,
"has_confict": false,
"id": 29180,
"inserted_at": "2023-09-01T18:25:49.705161Z",
"scheduled_at": "2023-09-01T18:26:19.707539Z",
"state": "available"
},
"args": {
"body": {
"author": "alex",
"content": "Hello world!"
},
"headers": {},
"method": "post",
"schedule_in": [30, "seconds"],
"url": "https://scheduler.booper.dev/api/channels/discord"
}
}
}
Body
Optional request body to pass through to the request.
Supports dynamic fields such as
Supports dynamic fields such as
$job, $state, and $previous for recurring
jobs. Learn more about dynamic fields here.How long to wait before executing the request. Set either as a number of
seconds, or a tuple such as
If you’d rather specify a timestamp at which to run the request, use the
[5, "minutes"]. If you’d rather specify a timestamp at which to run the request, use the
scheduled_at
field instead.The timestamp at which to execute the request. Set either as a datetime
string, or a unix timestamp.
If you want to schedule the request relative to now (e.g. “in 5 mins”), use the
If you want to schedule the request relative to now (e.g. “in 5 mins”), use the
schedule_in field instead.Setting this field will put the job on a recurring schedule. Set as either a
number of seconds, or a tuple such as
[5, "minutes"]The cron expression used to set the job on a recurring schedule.
For example,
For example,
*/5 * * * * would run every 5 minutes, 0 9 * * 1-5 runs
every Mon-Fri at 9am UTC.A value used to enforce idempotency, or uniqueness.
For example, if multiple jobs are scheduled with the same
For example, if multiple jobs are scheduled with the same
idempotency_key before
one of them is executed, every job but the first one will be ignored.A webhook URL to send job events to. Must use https. Job events include:
job.started, job.request, job.response, job.finished, job.error.Headers
curl --location --request POST 'https://scheduler.booper.dev/api/jobs' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer sk_public_20230921' \
--data-raw '{
"method": "post",
"url": "https://scheduler.booper.dev/api/broadcast",
"body": {"content": "Testing 123", "channel": "discord"},
"schedule_in": [30, "seconds"]
}'
npx @booper/cli run \
POST https://scheduler.booper.dev/api/broadcast \
--data 'content=Testing 123' \
--data 'channel=discord' \
--in '30 seconds'
{
"data": {
"id": "41d7f28b-dfbe-44b8-b716-b91898bb0ce0",
"idempotency_key": null,
"inserted_at": "2023-09-01T18:25:49",
"name": null,
"description": null,
"user_id": "bd2aa099-6eb7-4dbb-9178-32141def1355",
"schedule_id": null,
"job_id": 29180,
"job": {
"attempted_at": null,
"cancelled_at": null,
"completed_at": null,
"discarded_at": null,
"has_confict": false,
"id": 29180,
"inserted_at": "2023-09-01T18:25:49.705161Z",
"scheduled_at": "2023-09-01T18:26:19.707539Z",
"state": "available"
},
"args": {
"body": {
"author": "alex",
"content": "Hello world!"
},
"headers": {},
"method": "post",
"schedule_in": [30, "seconds"],
"url": "https://scheduler.booper.dev/api/channels/discord"
}
}
}