Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(alerts): add alert check time control (#96855)

Matt Puad7fe61cf45ab
diff --git a/products/alerts/backend/presentation/views/alert.py b/products/alerts/backend/presentation/views/alert.py
index 37e10496c56c..eac3c5939ae3 100644
--- a/products/alerts/backend/presentation/views/alert.py
+++ b/products/alerts/backend/presentation/views/alert.py
@@ -465,7 +465,7 @@ class AlertSerializer(SearchMatchTypeSerializerMixin, serializers.ModelSerialize
schedule_start_time = serializers.CharField(
required=False,
allow_null=True,
- help_text="Local time that starts alert checks in HH:MM format. Updating this value changes checks after the already scheduled next_check_at. Set null to remove the custom start time. The current next_check_at stays unchanged. Future checks use the alert interval's existing scheduling behavior.",
+ help_text="Local time that starts alert checks in HH:MM format. Updating this value recalculates the next check. Set null to remove the custom start time.",
)
snoozed_until = RelativeDateTimeField(
allow_null=True,
@@ -703,7 +703,7 @@ class AlertSerializer(SearchMatchTypeSerializerMixin, serializers.ModelSerialize
schedule_start_time_changed = validated_data["schedule_start_time"] != instance.schedule_start_time
instance = super().update(instance, validated_data)
- if schedule_restriction_changed and not schedule_start_time_changed:
+ if schedule_restriction_changed or schedule_start_time_changed:
instance.next_check_at = next_check_at_after_schedule_restriction_change(instance)
instance.save(update_fields=["next_check_at"])
diff --git a/products/alerts/backend/test/test_scheduling.py b/products/alerts/backend/test/test_scheduling.py
index 7ee289059651..362ad6948af5 100644
--- a/products/alerts/backend/test/test_scheduling.py
+++ b/products/alerts/backend/test/test_scheduling.py
@@ -148,16 +148,20 @@ class TestScheduleStartTime:
@parameterized.expand(
[
- (CalendarInterval.REAL_TIME, datetime(2026, 3, 18, 9, 35, tzinfo=UTC)),
- (CalendarInterval.EVERY_15_MINUTES, datetime(2026, 3, 18, 9, 35, tzinfo=UTC)),
- (CalendarInterval.HOURLY, datetime(2026, 3, 18, 9, 35, tzinfo=UTC)),
- (CalendarInterval.DAILY, datetime(2026, 3, 18, 9, 35, tzinfo=UTC)),
- (CalendarInterval.WEEKLY, datetime(2026, 3, 23, 9, 35, tzinfo=UTC)),
- (CalendarInterval.MONTHLY, datetime(2026, 4, 1, 9, 35, tzinfo=UTC)),
+ (CalendarInterval.REAL_TIME, "09:35", datetime(2026, 3, 18, 9, 35, tzinfo=UTC)),
+ (CalendarInterval.EVERY_15_MINUTES, "00:00", datetime(2026, 3, 18, 9, 45, tzinfo=UTC)),
+ (CalendarInterval.EVERY_15_MINUTES, "00:05", datetime(2026, 3, 18, 9, 35, tzinfo=UTC)),
+ (CalendarInterval.EVERY_15_MINUTES, "00:55", datetime(2026, 3, 18, 9, 40, tzinfo=UTC)),
+ (CalendarInterval.HOURLY, "00:00", datetime(2026, 3, 18, 10, 0, tzinfo=UTC)),
+ (CalendarInterval.HOURLY, "00:05", datetime(2026, 3, 18, 10, 5, tzinfo=UTC)),
+ (CalendarInterval.HOURLY, "00:55", datetime(2026, 3, 18, 9, 55, tzinfo=UTC)),
+ (CalendarInterval.DAILY, "09:35", datetime(2026, 3, 18, 9, 35, tzinfo=UTC)),
+ (CalendarInterval.WEEKLY, "09:35", datetime(2026, 3, 23, 9, 35, tzinfo=UTC)),
+ (CalendarInterval.MONTHLY, "09:35", datetime(2026, 4, 1, 9, 35, tzinfo=UTC)),
]
)
def test_next_check_uses_schedule_start_time_on_create(
- self, interval: CalendarInterval, expected: datetime
+ self, interval: CalendarInterval, schedule_start_time: str, expected: datetime
) -> None:
assert (
next_calendar_check_time(
@@ -165,7 +169,7 @@ class TestScheduleStartTime:
now=datetime(2026, 3, 18, 9, 30, tzinfo=UTC),
tz_name="UTC",
next_check_at=None,
- schedule_start_time="09:35",
+ schedule_start_time=schedule_start_time,
)
== expected
)
diff --git a/products/alerts/backend/tests/api/test_alert.py b/products/alerts/backend/tests/api/test_alert.py
index ac1a0ceee49f..61356333d8b0 100644
--- a/products/alerts/backend/tests/api/test_alert.py
+++ b/products/alerts/backend/tests/api/test_alert.py
@@ -1274,17 +1274,13 @@ class TestAlert(APIBaseTest, QueryMatchingTest):
@parameterized.expand(
[
- ("real_time", "real_time"),
- ("every_15_minutes", "every_15_minutes"),
- ("hourly", "hourly"),
- ("daily", "daily"),
- ("weekly", "weekly"),
- ("monthly", "monthly"),
+ ("every_15_minutes", "every_15_minutes", "2026-03-18T09:05:00+00:00"),
+ ("hourly", "hourly", "2026-03-18T09:35:00+00:00"),
]
)
@time_machine.travel("2026-03-18T09:00:00Z", tick=False)
- def test_patch_schedule_start_time_keeps_the_current_next_check(
- self, _name: str, calculation_interval: str
+ def test_patch_schedule_start_time_recalculates_the_next_check(
+ self, _name: str, calculation_interval: str, expected_next_check_at: str
) -> None:
self.organization.available_product_features = [
{"key": AvailableFeature.HIGH_FREQUENCY_ALERTS, "name": "High-frequency alerts"},
@@ -1316,10 +1312,12 @@ class TestAlert(APIBaseTest, QueryMatchingTest):
assert response.status_code == status.HTTP_200_OK, response.content
assert response.json()["schedule_start_time"] == "08:35"
- assert datetime.fromisoformat(response.json()["next_check_at"].replace("Z", "+00:00")) == scheduled_check
+ assert datetime.fromisoformat(
+ response.json()["next_check_at"].replace("Z", "+00:00")
+ ) == datetime.fromisoformat(expected_next_check_at)
@time_machine.travel("2026-03-18T09:00:00Z", tick=False)
- def test_patch_schedule_start_time_with_schedule_restriction_keeps_the_current_next_check(self) -> None:
+ def test_patch_schedule_start_time_with_schedule_restriction_recalculates_the_next_check(self) -> None:
alert = self.client.post(
f"/api/projects/{self.team.id}/alerts",
{
@@ -1347,7 +1345,9 @@ class TestAlert(APIBaseTest, QueryMatchingTest):
)
assert response.status_code == status.HTTP_200_OK, response.content
- assert datetime.fromisoformat(response.json()["next_check_at"].replace("Z", "+00:00")) == scheduled_check
+ assert datetime.fromisoformat(response.json()["next_check_at"].replace("Z", "+00:00")) == datetime(
+ 2026, 3, 18, 9, 35, tzinfo=UTC
+ )
def test_create_alert_with_schedule_restriction(self) -> None:
creation_request = {
diff --git a/products/alerts/frontend/components/AlertIntervalRow.tsx b/products/alerts/frontend/components/AlertIntervalRow.tsx
index eb00aa0779b3..ea19a3a6f0db 100644
--- a/products/alerts/frontend/components/AlertIntervalRow.tsx
+++ b/products/alerts/frontend/components/AlertIntervalRow.tsx
@@ -6,6 +6,7 @@ import { NextScheduledRun } from 'lib/components/ScheduledRunStatus'
import { TZLabel } from 'lib/components/TZLabel'
import { upgradeModalLogic } from 'lib/components/UpgradeModal/upgradeModalLogic'
import { LemonField } from 'lib/lemon-ui/LemonField'
+import { LemonInput } from 'lib/lemon-ui/LemonInput'
import { teamLogic } from 'scenes/teamLogic'
import { userLogic } from 'scenes/userLogic'
@@ -15,8 +16,12 @@ import { AvailableFeature } from '~/types'
import { AlertDefinitionRow } from 'products/alerts/frontend/components/AlertDefinition'
import { AlertFormType } from 'products/alerts/frontend/logic/alertFormLogic'
import {
+ canSetAlertScheduleStartTime,
cadenceFinerThanInsightInterval,
+ getAlertScheduleStartMinute,
selectAlertCalculationInterval,
+ scheduleStartTimeForInterval,
+ scheduleStartTimeForMinute,
} from 'products/alerts/frontend/logic/alertIntervalHelpers'
import { approximateNextAlertRun } from 'products/alerts/frontend/logic/alertSchedulingStale'
import {
@@ -95,7 +100,11 @@ export function AlertIntervalRow({
if (alertForm.calculation_interval === AlertCalculationInterval.REAL_TIME) {
nextEvaluation = null
} else if (creatingNewAlert || nextPlannedEvaluationStale) {
- const approximateTime = approximateNextAlertRun(alertForm.calculation_interval, currentTeam?.timezone ?? 'UTC')
+ const approximateTime = approximateNextAlertRun(
+ alertForm.calculation_interval,
+ currentTeam?.timezone ?? 'UTC',
+ alertForm.schedule_start_time
+ )
nextEvaluation = (
<NextScheduledRun label="Next planned evaluation:">
<span>
@@ -124,7 +133,6 @@ export function AlertIntervalRow({
const scheduleLabel =
alertForm.calculation_interval === AlertCalculationInterval.REAL_TIME ? 'Run alert' : 'Run alert every'
-
return (
<div className="space-y-2">
<AlertDefinitionRow label={scheduleLabel}>
@@ -144,6 +152,10 @@ export function AlertIntervalRow({
guardAvailableFeature,
onSelect: (selected) => {
onChange(selected)
+ onSetAlertFormValue(
+ 'schedule_start_time',
+ scheduleStartTimeForInterval(selected, alertForm.schedule_start_time)
+ )
if (
cadenceFinerThanInsightInterval(selected, trendInterval) &&
canCheckOngoingInterval &&
@@ -163,6 +175,26 @@ export function AlertIntervalRow({
/>
)}
</LemonField>
+ {canSetAlertScheduleStartTime(alertForm.calculation_interval) && (
+ <>
+ <span>at minute</span>
+ <LemonInput
+ className="w-20 shrink-0"
+ type="number"
+ min={0}
+ max={59}
+ step={1}
+ value={getAlertScheduleStartMinute(alertForm.schedule_start_time)}
+ onFocus={(event) => event.currentTarget.select()}
+ onChange={(minute) =>
+ onSetAlertFormValue('schedule_start_time', scheduleStartTimeForMinute(minute))
+ }
+ aria-label="Alert evaluation minute"
+ data-attr="alertForm-schedule-start-time"
+ />
+ <span>of the hour</span>
+ </>
+ )}
{evaluatedWindow}
</AlertDefinitionRow>
{nextEvaluation}
diff --git a/products/alerts/frontend/generated/api.schemas.ts b/products/alerts/frontend/generated/api.schemas.ts
index 87f632207a7c..2d844627142f 100644
--- a/products/alerts/frontend/generated/api.schemas.ts
+++ b/products/alerts/frontend/generated/api.schemas.ts
@@ -658,7 +658,7 @@ export interface AlertApi {
/** @nullable */
readonly last_checked_at: string | null
/**
- * Local time that starts alert checks in HH:MM format. Updating this value changes checks after the already scheduled next_check_at. Set null to remove the custom start time. The current next_check_at stays unchanged. Future checks use the alert interval's existing scheduling behavior.
+ * Local time that starts alert checks in HH:MM format. Updating this value recalculates the next check. Set null to remove the custom start time.
* @nullable
*/
schedule_start_time?: string | null
@@ -752,7 +752,7 @@ export interface PatchedAlertApi {
/** @nullable */
readonly last_checked_at?: string | null
/**
- * Local time that starts alert checks in HH:MM format. Updating this value changes checks after the already scheduled next_check_at. Set null to remove the custom start time. The current next_check_at stays unchanged. Future checks use the alert interval's existing scheduling behavior.
+ * Local time that starts alert checks in HH:MM format. Updating this value recalculates the next check. Set null to remove the custom start time.
* @nullable
*/
schedule_start_time?: string | null
diff --git a/products/alerts/frontend/logic/alertFormLogic.ts b/products/alerts/frontend/logic/alertFormLogic.ts
index 7093039f6bfe..c7141454b621 100644
--- a/products/alerts/frontend/logic/alertFormLogic.ts
+++ b/products/alerts/frontend/logic/alertFormLogic.ts
@@ -66,6 +66,7 @@ export type AlertFormType = Pick<
| 'config'
| 'skip_weekend'
| 'schedule_restriction'
+ | 'schedule_start_time'
| 'detector_config'
| 'investigation_agent_enabled'
| 'investigation_gates_notifications'
@@ -556,6 +557,7 @@ export const alertFormLogic = kea<alertFormLogicType>([
calculation_interval: calculationInterval,
skip_weekend: false,
schedule_restriction: null,
+ schedule_start_time: null,
detector_config: props.defaultToAnomalyDetection
? getDefaultAnomalyDetectorConfig(calculationInterval)
: null,
diff --git a/products/alerts/frontend/logic/alertIntervalHelpers.test.ts b/products/alerts/frontend/logic/alertIntervalHelpers.test.ts
index ad34a96c0209..516f01d3464a 100644
--- a/products/alerts/frontend/logic/alertIntervalHelpers.test.ts
+++ b/products/alerts/frontend/logic/alertIntervalHelpers.test.ts
@@ -7,9 +7,13 @@ import { initKeaTests } from '~/test/init'
import { AvailableFeature } from '~/types'
import {
+ canSetAlertScheduleStartTime,
+ getAlertScheduleStartMinute,
getDefaultSimulationRange,
isSubDailyAlertInterval,
selectAlertCalculationInterval,
+ scheduleStartTimeForInterval,
+ scheduleStartTimeForMinute,
} from './alertIntervalHelpers'
describe('alertIntervalHelpers', () => {
@@ -133,4 +137,62 @@ describe('alertIntervalHelpers', () => {
expect(isSubDailyAlertInterval(interval)).toBe(expected)
})
})
+
+ describe('canSetAlertScheduleStartTime', () => {
+ it.each([
+ [AlertCalculationInterval.REAL_TIME, false],
+ [AlertCalculationInterval.EVERY_15_MINUTES, false],
+ [AlertCalculationInterval.HOURLY, true],
+ [AlertCalculationInterval.DAILY, false],
+ [AlertCalculationInterval.WEEKLY, false],
+ [AlertCalculationInterval.MONTHLY, false],
+ ])('%s → %s', (interval, expected) => {
+ expect(canSetAlertScheduleStartTime(interval)).toBe(expected)
+ })
+ })
+
+ describe('schedule start time for interval', () => {
+ it.each([
+ [AlertCalculationInterval.EVERY_15_MINUTES, null],
+ [AlertCalculationInterval.HOURLY, '00:55'],
+ [AlertCalculationInterval.REAL_TIME, null],
+ [AlertCalculationInterval.DAILY, null],
+ [AlertCalculationInterval.WEEKLY, null],
+ [AlertCalculationInterval.MONTHLY, null],
+ ])('uses %s → %s', (interval, expected) => {
+ expect(scheduleStartTimeForInterval(interval, '00:55')).toBe(expected)
+ })
+
+ it.each([[AlertCalculationInterval.HOURLY, null]])(
+ 'preserves an unanchored %s schedule',
+ (interval, expected) => {
+ expect(scheduleStartTimeForInterval(interval, null)).toBe(expected)
+ }
+ )
+ })
+
+ describe('alert schedule start minute', () => {
+ it.each([
+ [undefined, undefined],
+ [null, undefined],
+ ['08:57', 57],
+ ['00:03', 3],
+ ])('reads %s as %s', (scheduleStartTime, expected) => {
+ expect(getAlertScheduleStartMinute(scheduleStartTime)).toBe(expected)
+ })
+
+ it.each([
+ [undefined, null],
+ [Number.NaN, null],
+ [1.5, null],
+ [-1, null],
+ [60, null],
+ [0, '00:00'],
+ [12, '00:12'],
+ [55, '00:55'],
+ [57, '00:57'],
+ ])('writes %s as %s', (minute, expected) => {
+ expect(scheduleStartTimeForMinute(minute)).toBe(expected)
+ })
+ })
})
diff --git a/products/alerts/frontend/logic/alertIntervalHelpers.ts b/products/alerts/frontend/logic/alertIntervalHelpers.ts
index 7ab46b270b57..c79daf81ae50 100644
--- a/products/alerts/frontend/logic/alertIntervalHelpers.ts
+++ b/products/alerts/frontend/logic/alertIntervalHelpers.ts
@@ -35,6 +35,31 @@ export function isSubDailyAlertInterval(interval: AlertCalculationInterval): boo
return SUB_DAILY_INTERVALS.includes(interval)
}
+export function canSetAlertScheduleStartTime(interval: AlertCalculationInterval): boolean {
+ return interval === AlertCalculationInterval.HOURLY
+}
+
+export function scheduleStartTimeForInterval(
+ interval: AlertCalculationInterval,
+ scheduleStartTime: string | null | undefined
+): string | null {
+ return canSetAlertScheduleStartTime(interval) ? (scheduleStartTime ?? null) : null
+}
+
+export function getAlertScheduleStartMinute(scheduleStartTime: string | null | undefined): number | undefined {
+ if (!scheduleStartTime) {
+ return undefined
+ }
+ return Number(scheduleStartTime.split(':')[1])
+}
+
+export function scheduleStartTimeForMinute(minute: number | null | undefined): string | null {
+ if (minute === null || minute === undefined || !Number.isInteger(minute) || minute < 0 || minute > 59) {
+ return null
+ }
+ return `00:${String(minute).padStart(2, '0')}`
+}
+
const INTERVAL_DISPLAY_LABELS: Record<AlertCalculationInterval, string> = {
[AlertCalculationInterval.REAL_TIME]: 'Real time',
[AlertCalculationInterval.EVERY_15_MINUTES]: 'Every 15 minutes',
diff --git a/products/alerts/frontend/logic/alertSchedulingStale.test.ts b/products/alerts/frontend/logic/alertSchedulingStale.test.ts
index 526d57696e89..fb1711553190 100644
--- a/products/alerts/frontend/logic/alertSchedulingStale.test.ts
+++ b/products/alerts/frontend/logic/alertSchedulingStale.test.ts
@@ -21,7 +21,28 @@ describe('alertSchedulingStale', () => {
])('matches the backend anchor for %s', (interval, expected) => {
const now = dayjs.utc('2026-07-24T16:00:00.000Z')
- expect(approximateNextAlertRun(interval, 'America/Toronto', now).toISOString()).toBe(expected)
+ expect(approximateNextAlertRun(interval, 'America/Toronto', null, now).toISOString()).toBe(expected)
+ })
+
+ it.each([
+ [
+ AlertCalculationInterval.EVERY_15_MINUTES,
+ '00:55',
+ '2026-07-24T16:30:00.000Z',
+ '2026-07-24T16:55:00.000Z',
+ ],
+ [
+ AlertCalculationInterval.EVERY_15_MINUTES,
+ '00:55',
+ '2026-07-24T16:55:00.000Z',
+ '2026-07-24T17:10:00.000Z',
+ ],
+ [AlertCalculationInterval.HOURLY, '00:55', '2026-07-24T16:30:00.000Z', '2026-07-24T16:55:00.000Z'],
+ [AlertCalculationInterval.HOURLY, '00:NaN', '2026-07-24T16:30:00.000Z', '2026-07-24T17:30:00.000Z'],
+ ])('uses %s schedule start time %s', (interval, scheduleStartTime, nowValue, expected) => {
+ const now = dayjs.utc(nowValue)
+
+ expect(approximateNextAlertRun(interval, 'UTC', scheduleStartTime, now).toISOString()).toBe(expected)
})
})
@@ -93,6 +114,17 @@ describe('alertSchedulingStale', () => {
},
true,
],
+ [
+ 'schedule_start_time',
+ {
+ calculation_interval: AlertCalculationInterval.DAILY,
+ schedule_restriction: null,
+ schedule_start_time: '08:30',
+ skip_weekend: false,
+ config: { check_ongoing_interval: false },
+ },
+ true,
+ ],
[
'check_ongoing_interval',
{
diff --git a/products/alerts/frontend/logic/alertSchedulingStale.ts b/products/alerts/frontend/logic/alertSchedulingStale.ts
index f60178dfd601..66e83de03397 100644
--- a/products/alerts/frontend/logic/alertSchedulingStale.ts
+++ b/products/alerts/frontend/logic/alertSchedulingStale.ts
@@ -13,6 +13,7 @@ function calendarAnchor(localDate: Dayjs, hour: number, timezone: string): Dayjs
export function approximateNextAlertRun(
interval: AlertCalculationInterval,
timezone: string,
+ scheduleStartTime: string | null | undefined = null,
now: Dayjs = dayjs()
): Dayjs {
let localNow: Dayjs
@@ -23,13 +24,31 @@ export function approximateNextAlertRun(
localNow = now.utc()
}
+ const scheduleStartMinute = scheduleStartTime ? Number(scheduleStartTime.split(':')[1]) : undefined
+ const nextRunFromScheduleStartMinute = (cadenceMinutes: number): Dayjs | null => {
+ if (
+ scheduleStartMinute === undefined ||
+ !Number.isInteger(scheduleStartMinute) ||
+ scheduleStartMinute < 0 ||
+ scheduleStartMinute > 59
+ ) {
+ return null
+ }
+
+ let candidate = localNow.startOf('hour').minute(scheduleStartMinute).second(0).millisecond(0)
+ while (!candidate.isAfter(localNow)) {
+ candidate = candidate.add(cadenceMinutes, 'minutes')
+ }
+ return candidate
+ }
+
switch (interval) {
case AlertCalculationInterval.REAL_TIME:
return localNow.add(2, 'minutes')
case AlertCalculationInterval.EVERY_15_MINUTES:
- return localNow.add(15, 'minutes')
+ return nextRunFromScheduleStartMinute(15) ?? localNow.add(15, 'minutes')
case AlertCalculationInterval.HOURLY:
- return localNow.add(1, 'hour')
+ return nextRunFromScheduleStartMinute(60) ?? localNow.add(1, 'hour')
case AlertCalculationInterval.DAILY:
return calendarAnchor(localNow.add(1, 'day'), 1, timezone)
case AlertCalculationInterval.WEEKLY: {
@@ -54,6 +73,7 @@ export function normalizeScheduleRestrictionForCompare(
export type SchedulingSnapshot = {
calculation_interval: AlertCalculationInterval
schedule_restriction?: ScheduleRestriction | null
+ schedule_start_time?: string | null
skip_weekend?: boolean | null
config?: { check_ongoing_interval?: boolean } | null
}
@@ -80,6 +100,9 @@ export function isNextPlannedEvaluationStale(
if (Boolean(form.skip_weekend) !== Boolean(saved.skip_weekend)) {
return true
}
+ if (form.schedule_start_time !== saved.schedule_start_time) {
+ return true
+ }
if (Boolean(form.config?.check_ongoing_interval) !== Boolean(saved.config?.check_ongoing_interval)) {
return true
}
diff --git a/products/alerts/frontend/types.ts b/products/alerts/frontend/types.ts
index a51e9d7fe640..36b8eae7bd40 100644
--- a/products/alerts/frontend/types.ts
+++ b/products/alerts/frontend/types.ts
@@ -117,6 +117,7 @@ export interface AlertTypeBase {
config: AlertConfig
skip_weekend?: boolean
schedule_restriction?: ScheduleRestriction | null
+ schedule_start_time?: string | null
detector_config?: DetectorConfig | null
investigation_agent_enabled?: boolean
investigation_gates_notifications?: boolean
diff --git a/products/alerts/frontend/views/EditAlertModal.tsx b/products/alerts/frontend/views/EditAlertModal.tsx
index 40a6ee2aad24..abe42ee385d0 100644
--- a/products/alerts/frontend/views/EditAlertModal.tsx
+++ b/products/alerts/frontend/views/EditAlertModal.tsx
@@ -223,6 +223,7 @@ export function EditAlertModal(props: AlertModalProps): JSX.Element {
? {
calculation_interval: alert.calculation_interval,
schedule_restriction: alert.schedule_restriction,
+ schedule_start_time: alert.schedule_start_time,
skip_weekend: alert.skip_weekend,
config: supportsOngoingInterval(alert.config)
? { check_ongoing_interval: alert.config.check_ongoing_interval }
@@ -232,6 +233,7 @@ export function EditAlertModal(props: AlertModalProps): JSX.Element {
{
calculation_interval: alertForm.calculation_interval,
schedule_restriction: alertForm.schedule_restriction,
+ schedule_start_time: alertForm.schedule_start_time,
skip_weekend: alertForm.skip_weekend,
config: supportsOngoingInterval(alertForm.config)
? { check_ongoing_interval: alertForm.config.check_ongoing_interval }
@@ -242,6 +244,7 @@ export function EditAlertModal(props: AlertModalProps): JSX.Element {
alert,
alertForm.calculation_interval,
alertForm.schedule_restriction,
+ alertForm.schedule_start_time,
alertForm.skip_weekend,
alertForm.config,
creatingNewAlert,
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index b24a342a8be0..f5660c9b7bbf 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -10266,7 +10266,7 @@ export namespace Schemas {
/** @nullable */
readonly last_checked_at: string | null;
/**
- * Local time that starts alert checks in HH:MM format. Updating this value changes checks after the already scheduled next_check_at. Set null to remove the custom start time. The current next_check_at stays unchanged. Future checks use the alert interval's existing scheduling behavior.
+ * Local time that starts alert checks in HH:MM format. Updating this value recalculates the next check. Set null to remove the custom start time.
* @nullable
*/
schedule_start_time?: string | null;
@@ -63189,7 +63189,7 @@ export namespace Schemas {
/** @nullable */
readonly last_checked_at?: string | null;
/**
- * Local time that starts alert checks in HH:MM format. Updating this value changes checks after the already scheduled next_check_at. Set null to remove the custom start time. The current next_check_at stays unchanged. Future checks use the alert interval's existing scheduling behavior.
+ * Local time that starts alert checks in HH:MM format. Updating this value recalculates the next check. Set null to remove the custom start time.
* @nullable
*/
schedule_start_time?: string | null;
diff --git a/services/mcp/src/generated/alerts/api.ts b/services/mcp/src/generated/alerts/api.ts
index f76aabc345e8..847facfa93e3 100644
--- a/services/mcp/src/generated/alerts/api.ts
+++ b/services/mcp/src/generated/alerts/api.ts
@@ -140,7 +140,7 @@ export const AlertsCreateBody = () => zod.object({
.string()
.nullish()
.describe(
- "Local time that starts alert checks in HH:MM format. Updating this value changes checks after the already scheduled next_check_at. Set null to remove the custom start time. The current next_check_at stays unchanged. Future checks use the alert interval's existing scheduling behavior."
+ 'Local time that starts alert checks in HH:MM format. Updating this value recalculates the next check. Set null to remove the custom start time.'
),
config: zod
.union([
@@ -1453,7 +1453,7 @@ export const AlertsPartialUpdateBody = () => zod.object({
.string()
.nullish()
.describe(
- "Local time that starts alert checks in HH:MM format. Updating this value changes checks after the already scheduled next_check_at. Set null to remove the custom start time. The current next_check_at stays unchanged. Future checks use the alert interval's existing scheduling behavior."
+ 'Local time that starts alert checks in HH:MM format. Updating this value recalculates the next check. Set null to remove the custom start time.'
),
config: zod
.union([
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/alert-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/alert-create.json
index be15e9188bdf..4d83476ff826 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/alert-create.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/alert-create.json
@@ -2290,7 +2290,7 @@
"type": "null"
}
],
- "description": "Local time that starts alert checks in HH:MM format. Updating this value changes checks after the already scheduled next_check_at. Set null to remove the custom start time. The current next_check_at stays unchanged. Future checks use the alert interval's existing scheduling behavior."
+ "description": "Local time that starts alert checks in HH:MM format. Updating this value recalculates the next check. Set null to remove the custom start time."
},
"skip_weekend": {
"anyOf": [
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/alert-update.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/alert-update.json
index 5d3b3560609a..b953bccecb38 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/alert-update.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/alert-update.json
@@ -2294,7 +2294,7 @@
"type": "null"
}
],
- "description": "Local time that starts alert checks in HH:MM format. Updating this value changes checks after the already scheduled next_check_at. Set null to remove the custom start time. The current next_check_at stays unchanged. Future checks use the alert interval's existing scheduling behavior."
+ "description": "Local time that starts alert checks in HH:MM format. Updating this value recalculates the next check. Set null to remove the custom start time."
},
"skip_weekend": {
"anyOf": [