Skip to content

Commit ca78ddc

Browse files
committed
Changed the minimum interval time from 60s to 20s
1 parent 07ed8c3 commit ca78ddc

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

apps/webapp/app/services/schedules/registerScheduleSource.server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ function validateSchedule(schedule: ScheduleMetadata): ScheduleMetadata {
103103
}
104104

105105
function validateInterval(schedule: IntervalMetadata): ScheduleMetadata {
106-
if (schedule.options.seconds < 60) {
106+
if (schedule.options.seconds < 20) {
107107
return {
108108
type: "interval",
109109
options: {
110-
seconds: 60,
110+
seconds: 20,
111111
},
112112
};
113113
}

docs/sdk/intervaltrigger.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ description: "`intervalTrigger()` is set as a [Job's trigger](/sdk/job) to trigg
1212
Intervals are set with a number of seconds. There are some important considerations:
1313

1414
- 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.
15-
- The minimum interval is 60 seconds (any input less than this it will default to 60).
15+
- The minimum interval is 20 seconds (any input less than this it will default to 20).
1616
- The maximum interval is 2_592_000 seconds (30 days), if you pass more than this it will trigger every 30 days.
1717

1818
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.

packages/core/src/schemas/schedules.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export const ScheduledPayloadSchema = z.object({
1010
export type ScheduledPayload = z.infer<typeof ScheduledPayloadSchema>;
1111

1212
export const IntervalOptionsSchema = z.object({
13-
/** The number of seconds for the interval. Min = 60, Max = 2_592_000 (30 days) */
14-
seconds: z.number().int().positive().min(60).max(2_592_000),
13+
/** The number of seconds for the interval. Min = 20, Max = 2_592_000 (30 days) */
14+
seconds: z.number().int().positive().min(20).max(2_592_000),
1515
});
1616

1717
/** Interval options */

0 commit comments

Comments
 (0)