---
updatedAt: 2026-05-12T09:58:17.000Z
---

# Modify a schedule

This operation enables you to modify the schedule for the specified job.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Job API (Legacy)",
    "contact": {},
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com"
    }
  ],
  "paths": {
    "/api/job/{job_id}/schedule": {
      "put": {
        "tags": [
          "Job API v1.0"
        ],
        "summary": "Modify a schedule",
        "description": "This operation enables you to modify the schedule for the specified job.",
        "operationId": "putJobSchedule",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "description": "The ID number of the desired Job resource.",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Holds the information to update job schedule.",
          "content": {
            "application/json": {
              "encoding": {},
              "schema": {
                "properties": {
                  "job": {
                    "$ref": "#/components/schemas/JobSchedulePutRequest"
                  }
                }
              }
            },
            "application/xml": {
              "encoding": {},
              "schema": {
                "$ref": "#/components/schemas/JobSchedulePutRequest"
              },
              "example": "XML preview is currently not supported."
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Provides the information about updated job schedule.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobSchedule"
                }
              },
              "application/xml": {
                "example": "XML preview is currently not supported."
              }
            }
          },
          "400": {
            "description": "BadRequestResponse indicates a request with invalid parameters.",
            "content": {}
          },
          "401": {
            "description": "UnauthorizedResponse signals an unauthorized API access.",
            "content": {}
          },
          "403": {
            "description": "ForbiddenResponse signals a request for a resource that does not exist or is not authorized.",
            "content": {}
          },
          "500": {
            "description": "GenericError generic error.",
            "content": {}
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "JobTargetPutRequest": {
        "description": "Two options are available: id or type. The ''id'' specifies the target ID, a unique identifier. The ''type'' specifies the target type where the job will run (only 'site' is supported). If a type is given, the site id property is also required.",
        "properties": {
          "type": {
            "type": "string"
          },
          "site": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "Site ID where this job should run."
              }
            }
          },
          "id": {
            "type": "string"
          }
        }
      },
      "JobPutRequest": {
        "properties": {
          "name": {
            "type": "string",
            "description": "Desired name for job."
          },
          "jobtype": {
            "type": "string",
            "description": "Type of job. EXAMPLE: ''scan'', ''scan_sca''"
          },
          "creator": {
            "type": "string"
          },
          "target": {
            "$ref": "#/components/schemas/JobTargetPutRequest"
          },
          "timezone": {
            "type": "string",
            "description": "Timezone for job schedule. EXAMPLE: 'America/New_York'"
          },
          "start_date": {
            "type": "string",
            "nullable": true,
            "description": "Requires a valid ISO-8601 (UTC/GMT) date format string. EXAMPLE: 'YYYY-MM-DDThh:mm:ssZ' -> '2008-12-12T21:35:59Z'"
          },
          "specs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "This required field indicates scan frequency. The 'single' type is a one-time scan. The 'cron' type indicates a custom schedule that must be used along with a cron_spec. When adding a continuous schedule, the name must also be 'continuous'."
                },
                "cron_spec": {
                  "type": "string",
                  "description": "Cron specification string. This should only be used with the 'cron' schedule type. For more information on how to craft a custom scan schedule using cron, please see https://en.wikipedia.org/wiki/Cron. NOTE: The WhiteHat cron scheduler differs from standard cron due to the addition of a new 'year' field as the last (6th) field. You MUST include this field, which requires either a '*' or a 4-digit year. EXAMPLES: '0 20 * * * *' (run at 8pm daily forever), '0 20 * * * 2016' (run at 8pm daily in 2016 only)."
                },
                "duration": {
                  "type": "number",
                  "nullable": true,
                  "description": "Desired maximum duration for each scan in seconds."
                },
                "weekday": {
                  "type": "string",
                  "description": "One or more days of the week (comma-separated) you would like your application scanned. NOTE: This only applies to a 'weekly' schedule type. When adding a weekly schedule, without a cron_spec, the scan will start at midnight of the next upcoming chosen day. For example if the current day is Monday, scheduling a weekly scan with the first day as Monday, it will begin the scan the following Monday at 0:00am.",
                  "enum": [
                    "Sunday",
                    "Monday",
                    "Tuesday",
                    "Wednesday",
                    "Thursday",
                    "Friday",
                    "Saturday"
                  ]
                }
              }
            }
          }
        }
      },
      "JobSchedulePutRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/JobPutRequest"
          }
        ]
      },
      "JobSchedule": {
        "properties": {
          "name": {
            "type": "string"
          },
          "api-version": {
            "type": "number"
          },
          "creator": {
            "type": "string",
            "nullable": true
          },
          "start_date": {
            "type": "string",
            "nullable": true
          },
          "job": {
            "properties": {
              "id": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "id": {
            "type": "string"
          },
          "specs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "time": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "cron_spec": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "duration": {
                  "type": "number",
                  "nullable": true
                }
              }
            }
          },
          "timezone": {
            "type": "string"
          },
          "href": {
            "type": "string"
          }
        }
      }
    }
  },
  "x-explorer-enabled": false,
  "x-readme": {
    "proxy-enabled": true
  }
}
```