Manage scheduled HTTP requests with the Cronhost SDK
Promise<Schedule[]>
id
(string, required): The unique identifier of the schedulePromise<Schedule>
name
(string, required): A descriptive name for the scheduledescription
(string, optional): Additional description of what the schedule doescronExpression
(string, required): Valid cron expression defining when to runtimezone
(string, required): IANA timezone identifier (e.g., ‘America/New_York’) - View all optionsendpoint
(string, required): The HTTP endpoint to callhttpMethod
(“GET” | “POST” | “PUT” | “DELETE” | “PATCH”, required): HTTP method to usebody
(string, optional): Request body for POST/PUT/PATCH requestsheaders
(Record<string, string>
, optional): HTTP headers to include in the requestmaxRetries
(number, optional): Maximum number of retry attempts (default: 3)timeoutSeconds
(number, optional): Request timeout in seconds (default: 30)Promise<Schedule>
id
(string, required): The unique identifier of the schedule to updatedata
(UpdateScheduleData, required): Object containing fields to updatename
(string): Update the schedule namedescription
(string): Update the descriptioncronExpression
(string): Update the cron expressiontimezone
(string): Update the timezoneendpoint
(string): Update the endpoint URLhttpMethod
(“GET” | “POST” | “PUT” | “DELETE” | “PATCH”): Update HTTP methodbody
(string): Update request bodyheaders
(Record<string, string>
): Update HTTP headersmaxRetries
(number): Update retry limittimeoutSeconds
(number): Update timeoutPromise<Schedule>
id
(string, required): The unique identifier of the schedule to deletePromise<void>
id
(string, required): The unique identifier of the scheduleenabled
(boolean, required): Whether to enable (true) or disable (false) the schedulePromise<Schedule>
id
(string, required): The unique identifier of the schedule to triggerPromise<Job>
- Returns the created job that will execute the request