Revert "Changed the minimum interval time from 60s to 20s"

This reverts commit ca78ddc2c2.
This commit is contained in:
Matt Aitken
2024-01-21 17:04:11 +00:00
parent c272e38de2
commit 32cf5790cb
3 changed files with 5 additions and 5 deletions
@@ -103,11 +103,11 @@ function validateSchedule(schedule: ScheduleMetadata): ScheduleMetadata {
}
function validateInterval(schedule: IntervalMetadata): ScheduleMetadata {
if (schedule.options.seconds < 20) {
if (schedule.options.seconds < 60) {
return {
type: "interval",
options: {
seconds: 20,
seconds: 60,
},
};
}
+1 -1
View File
@@ -12,7 +12,7 @@ description: "`intervalTrigger()` is set as a [Job's trigger](/sdk/job) to trigg
Intervals are set with a number of seconds. There are some important considerations:
- The Job will first run the specified number of seconds after it has first connected to an [Environment](/documentation/concepts/environments-endpoints). This will happen when you first [deploy](/documentation/guides/deployment) that Job.
- The minimum interval is 20 seconds (any input less than this it will default to 20).
- The minimum interval is 60 seconds (any input less than this it will default to 60).
- The maximum interval is 2_592_000 seconds (30 days), if you pass more than this it will trigger every 30 days.
If you wish to Run a Job at an exact time or less frequently than once pr day you should use a [cronTrigger()](/sdk/crontrigger) instead.
+2 -2
View File
@@ -10,8 +10,8 @@ export const ScheduledPayloadSchema = z.object({
export type ScheduledPayload = z.infer<typeof ScheduledPayloadSchema>;
export const IntervalOptionsSchema = z.object({
/** The number of seconds for the interval. Min = 20, Max = 2_592_000 (30 days) */
seconds: z.number().int().positive().min(20).max(2_592_000),
/** The number of seconds for the interval. Min = 60, Max = 2_592_000 (30 days) */
seconds: z.number().int().positive().min(60).max(2_592_000),
});
/** Interval options */