Skip to main content

Job Management

Jobs represent individual executions of your scheduled HTTP requests. Each time a schedule runs (either automatically via cron or manually triggered), it creates a job that tracks the execution details, status, and results.

List Jobs

Retrieve the execution history for a single schedule. scheduleId is required, and the response is paginated.
Parameters:
  • params (GetJobsParams, required): Filter and pagination options
GetJobsParams fields:
  • scheduleId (string, required): The schedule whose jobs to list
  • status (“PENDING” | “RUNNING” | “SUCCESS” | “FAILED”, optional): Filter by job status
  • page (number, optional): Page number, 1-based (default: 1)
  • pageSize (number, optional): Jobs per page (default: 20, max: 100)
Returns: Promise<JobsPage> where JobsPage is { jobs: Job[]; page: number; pageSize: number; totalPages: number; total: number }
In SDK 1.x, getJobs() returned Job[] and scheduleId was optional. As of 2.0, scheduleId is required and the method returns a paginated JobsPage. Read the rows from page.jobs.

Get Job by ID

Retrieve detailed information about a specific job.
Parameters:
  • id (string, required): The unique identifier of the job
Returns: Promise<Job>

Job Status Types

Jobs can have one of four statuses:
  • PENDING: Job is queued and waiting to execute
  • RUNNING: Job is currently executing the HTTP request
  • SUCCESS: Job completed successfully (response status below 400 by default, or one of the schedule’s expectedStatusCodes)
  • FAILED: Job failed due to an unexpected status code, timeout, or network issue
For the full rules on success, retries, and how executions count toward your plan, see the Execution Model.

Example: Monitoring Job Execution

Job Object Structure

Each job contains detailed execution information:

Error Handling

When monitoring jobs, handle potential errors: