Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(scheduled-tasks): cron schedules, and runs no longer stack while the agent is busy #19381

Closedthymikee(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/19381/headopened View on GitHub

Showing 38 changed files with 81 additions and 3 deletions (loading 35).

x
0 of 38 viewed, 38 left
59 additions and 2 deletionsapps/mobile/src/features/settings/SettingsScheduledTasksRouteScreen.tsxModified
View file
@@ -25,6 +25,12 @@
DEFAULT_WEBHOOK_PROMPT,
parseMaxDeliveryAge,
} from "@t3tools/client-runtime/scheduled-task-webhook";
+import {
+ CRON_EXPRESSION_HINT,
+ cronScheduleLabel,
+ formatWaitingForPreviousRun,
+ isCronExpression,
+} from "@t3tools/client-runtime/scheduled-task-schedule";
import {
useCallback,
useEffect,
@@ -105,6 +111,7 @@
function describeSchedule(task: ScheduledTask): string {
if (task.schedule.type === "webhook") return "On webhook";
if (task.schedule.type === "interval") return formatScheduledTaskInterval(task.schedule.everyMs);
+ if (task.schedule.type === "cron") return cronScheduleLabel(task.schedule);
const days = task.schedule.weekdays?.length ? repeatLabel(task.schedule.weekdays) : "Every day";
return `${days} at ${formatTime(task.schedule.timeOfDay)}`;
@@ -863,6 +870,7 @@
{ value: "fixed_time", label: "At a time" },
{ value: "interval", label: "Interval" },
{ value: "webhook", label: "On webhook" },
+ { value: "cron", label: "Custom" },
selected={draft.schedule.mode}