Elevate Scheduler (1)

Download OpenAPI specification:Download

This is a Job Scheduling Service based on the BullMQ library. With the power of BullMQ, this service provides a robust and scalable solution for handling job queues and scheduling tasks. The Job Scheduling Service enables them to streamline their workflow by automating recurring tasks, background processing, and asynchronous job execution. It empowers administrators, and developers to define and manage complex job scheduling requirements with ease.

Default

Create repeatable jobs

The Scheduler Service using BullMQ allows you to add jobs to a queue with different scheduling options. It supports three types of jobs: delayed jobs, repeatable jobs with a cron pattern, and repeatable jobs with an interval. Accepts a JSON request body with specific parameters.

Request Body schema: application/json

Job details

jobName
required
string

Name of the job to be executed

email
required
Array of strings

Email addresses associated with the job to report job failure

required
object

Details about the HTTP request to be made when the job is processed

required
delay (object) or repeat (object)

Responses

Request samples

Content type
application/json
Example
{
  • "jobName": "emailCronJobBeforeOneHour",
  • "email": [
    ],
  • "request": {},
  • "jobOptions": {
    }
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "responseCode": 200,
  • "message": "Job queued successfully",
  • "result": {
    },
  • "meta": {
    }
}

Remove a single job from the scheduler queue

It is used to remove a single job from the scheduler queue. The request body contains a JSON object with the jobId property, representing the unique identifier of the job to be removed.

Request Body schema: application/json
jobId
required
string

Unique identifier of the job to be removed

Responses

Request samples

Content type
application/json
{
  • "jobId": "emailCronJobBeforeOneHour"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "responseCode": 200,
  • "message": "Job successfully removed",
  • "result": true,
  • "meta": {
    }
}

Purge jobs/queue

Purge jobs/queue using different methods (clean, drain, obliterate). Accepts a JSON request body with the method and options parameters. Note: "options" parameter is only needed for the clean method.

Request Body schema: application/json
method
required
string
Enum: "clean" "drain" "obliterate"

BullMQ method for purging jobs

CleanOptions (object) or DrainOrObliterateOptions (object)

Options specific to the selected purging method

Responses

Request samples

Content type
application/json
Example
{
  • "method": "clean",
  • "options": {
    }
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "responseCode": 200,
  • "message": "Jobs cleaned successfully",
  • "result": { },
  • "meta": {
    }
}

Get list of jobs

Get a list of jobs from the scheduler

query Parameters
filter
string
Enum: "completed" "failed" "delayed" "active" "wait" "paused" "repeat"

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "responseCode": 200,
  • "message": "Job list successfully retrieved",
  • "result": [
    ],
  • "meta": {
    }
}

Update delay of created job with id

The Scheduler Service using BullMQ allows you to add jobs to a queue with different scheduling options. It supports three types of jobs: delayed jobs, repeatable jobs with a cron pattern, and repeatable jobs with an interval. Accepts a JSON request body with specific parameters.

Request Body schema: application/json

Job details

delay
required
number
id
required
number

Responses

Request samples

Content type
application/json
{
  • "delay": 120000,
  • "id": 50
}

Response samples

Content type
application/json
{
  • "success": true,
  • "responseCode": 200,
  • "message": "Job delay updated successfully",
  • "result": {
    },
  • "meta": {
    }
}