Skip to main content

Scheduling

Job scheduling configuration and fire time preview.

GET /api/job-fire-times

Preview upcoming execution times for a given schedule configuration.

Authentication: Required

Query Parameters:

ParameterTypeRequiredDescription
intervalstringYesCron expression or simple interval
intervalTypestringNocron, simple, or once
timezonestringNoTimezone (e.g., America/New_York)
startOndateNoStart date
endOndateNoEnd date
countintegerNoNumber of fire times to return (default: 10)

Example:

GET /api/job-fire-times?interval=0 8 * * *&timezone=America/New_York&count=5

Response:

{
"fireTimes": [
"2024-02-10T13:00:00Z",
"2024-02-11T13:00:00Z",
"2024-02-12T13:00:00Z",
"2024-02-13T13:00:00Z",
"2024-02-14T13:00:00Z"
]
}
Schedule Validation

Use this endpoint before creating or updating a job to validate that the schedule configuration produces the expected execution times.


Job Scheduling Fields

When creating or updating a job via POST /api/jobs or PUT /api/jobs/{id}, use these fields:

FieldTypeDescription
intervalstringCron expression (e.g., "0 8 * * *") or simple interval (e.g., "1 hour", "30 minutes")
intervalTypestringType: cron, simple, or once
timezonestringTimezone for schedule interpretation (e.g., "America/New_York")
startOndateJob won't run before this date
endOndateJob won't run after this date
enabledbooleanEnable/disable job execution

Cron Expression Format

Standard cron format: minute hour day month weekday

Examples:

ExpressionDescription
0 8 * * *Daily at 8:00 AM
0 */4 * * *Every 4 hours
0 9 * * 1Every Monday at 9:00 AM
0 0 1 * *First day of month at midnight
*/15 * * * *Every 15 minutes

Simple Interval Format

Human-readable intervals: <number> <unit>

Examples:

IntervalDescription
1 hourEvery hour
30 minutesEvery 30 minutes
1 dayDaily
1 weekWeekly

Schedule Examples

Daily Report at 8 AM Eastern

{
"interval": "0 8 * * *",
"intervalType": "cron",
"timezone": "America/New_York",
"enabled": true
}

Hourly Sync (Simple Interval)

{
"interval": "1 hour",
"intervalType": "simple",
"enabled": true
}

Run Once at Specific Time

{
"interval": null,
"intervalType": "once",
"startOn": "2024-03-01T12:00:00Z",
"enabled": true
}

Weekly on Fridays

{
"interval": "0 17 * * 5",
"intervalType": "cron",
"timezone": "America/Los_Angeles",
"enabled": true
}