PolyAPI · Schema

PolyAPI Job

A job executes a function at a set time, interval, or CRON schedule for automated recurring tasks.

IntegrationsMicroservicesMiddlewareOrchestrationsPro-Code API Composition

Properties

Name Type Description
id string The unique identifier of the job.
name string The name of the job.
description string A description of the job.
functionId string The ID of the function to execute.
functionType string The type of function to execute.
schedule string The CRON expression or interval defining when the job runs.
state string The state of the job.
lastRunAt string Timestamp of the last execution.
nextRunAt string Timestamp of the next scheduled execution.
createdAt string Timestamp when the job was created.
updatedAt string Timestamp when the job was last updated.
View JSON Schema on GitHub

JSON Schema

job.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/api-evangelist/polyapi/blob/main/json-schema/job.json",
  "title": "PolyAPI Job",
  "description": "A job executes a function at a set time, interval, or CRON schedule for automated recurring tasks.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique identifier of the job."
    },
    "name": {
      "type": "string",
      "description": "The name of the job."
    },
    "description": {
      "type": "string",
      "description": "A description of the job."
    },
    "functionId": {
      "type": "string",
      "description": "The ID of the function to execute."
    },
    "functionType": {
      "type": "string",
      "enum": ["server", "api"],
      "description": "The type of function to execute."
    },
    "schedule": {
      "type": "string",
      "description": "The CRON expression or interval defining when the job runs."
    },
    "state": {
      "type": "string",
      "enum": ["active", "inactive"],
      "description": "The state of the job."
    },
    "lastRunAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp of the last execution."
    },
    "nextRunAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp of the next scheduled execution."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the job was created."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the job was last updated."
    }
  },
  "required": ["name", "functionId", "functionType", "schedule"]
}