Repository navigation
Closed
1 / 11 of 1 issue completedClosed
1 / 11 of 1 issue completed
Copy link
Labels
product / authFixes and upgrades for the Appwrite Auth / Users / Teams services.product / avatarsFixes and upgrades for the Appwrite Avatars.product / consoleConsole, UI and UX issuesproduct / databasesFixes and upgrades for the Appwrite Database.product / functionsFixes and upgrades for the Appwrite Functions.product / messagingFixes and upgrades for the Appwrite Messaging.product / migrationsFixes and upgrades for the Appwrite Migrations.product / sitesFixes and upgrades for Appwrite Sites.product / storageFixes and upgrades for the Appwrite Storage.product / vcsFixes and upgrades for the Appwrite VCS.
Description
Add first-class interval schedules for functions so free users get a platform-chosen cadence (min every hour) instead of arbitrary crons, make intervals the recommended path for everyone, and gate custom cron to Pro+.
Plan
Goal: Reduce keep-alive abuse and top-of-hour load by replacing free-plan cron with interval schedules (platform picks the minute), while Pro keeps cron as an advanced option behind a clear Recommend tag on intervals.
Current footprint:
- Schedules are cron-only strings today: platform
schedulescollection (scheduleattr) in app/config/collections/platform.php; mirrored on the function doc (schedule/scheduleId) in projects.php. Written from Functions/Create.php / Update.php viaAppwrite\Task\Validator\Cron. - Scheduler path: ScheduleFunctions → Schedule\Source\Functions builds
new Shifted(new Cron(...), offset). Utopia already shipsTrigger\Interval(epoch-anchored grid) but nothing wires it for functions yet. - Levi’s spread (partial fix for hourly bunching only): #13121 / #13122 (
_APP_FUNCTIONS_SCHEDULE_SPREAD+ overridablespreadWindow); shared in #13172. Cloud override spreads free/education only, paid stay exact: cloud ScheduleFunctions.php. Does not stop* * * * *keep-alive or change what users may set. - Plan gates: plans.php caps free at 2 functions / 750k executions / 100 GBHours; no schedule/cron feature flag today. Pro feature pattern exists (e.g.
backups.enabled). - Console UI is cron-only: legacy updateSchedule.svelte + inputCron.svelte; vibes CronScheduleEditor.tsx presets map to cron (
every-minute→* * * * *, etc.). - Counts/savings: unknown from repo — no free-cron inventory in code/docs. Measure via platform DB: join active
schedules(resourceType=function,active=true) to teams on free/education and bucket by expression (* * * * *,*/5,0 * * * *, …). Cost drivers: billed executions + GBHours (usage.php: $2/1M exec, $0.06/GB-hour for paid overage; free is included quota identity spend) plus warm-runtime / cold-start herd that Levi’s spread only partially softens.
Remaining steps:
- Interval schedule feature — Add schedule type (cron | interval) + interval seconds on function/schedule docs; wire
Trigger\IntervalinSchedule\Source\Functionswith a platform-chosen anchor/minute (stable per function id, same spirit ascrc32spread) so free min interval = 3600s and runs do not bunch. API + SDK + validator; reject free intervals < 1h. - Gate new crons to Pro+ — Cloud: refuse
schedulecron creates/updates for free/education (grandfather existing until migration); expose plan flag (mirrorbackups.enabled). Self-hosted stays unrestricted. - Console UX — Vibes + legacy: interval picker as default with Recommend tag; demote cron to Advanced/Pro. Drop or hide free-tier presets denser than hourly.
- Migration estimate (then optional email) — Query free active function crons → map each to closest allowed interval → estimate monthly exec/GBHour reduction vs status quo; only then decide mass email + auto-migrate.
Risks:
- Grandfathering vs forced migrate: breaking existing free
* * * * *without notice. - Interval anchor choice must survive restarts (Interval already does) and stay stable when users change only the period.
- SDK/docs still document cron-as-only schedule; dual-write during rollout.
- Savings number needs a prod query before committing to email/migration effort.
Done when:
- Free users can create interval schedules (≥ 1h) with platform-chosen phase; cannot create new cron schedules
- Pro+ can still set cron; Console highlights intervals (Recommend) for all plans
- Scheduler dispatches intervals via
Trigger\Interval(not cron-emulation) - Written estimate of free-cron → interval savings (or documented why not worth migrating)
- Docs/SDK updated; Levi spread remains for any remaining shared cron slots on free
Sub-issues
Collapse Sub-issuesSub-issues
Loading 1 sub-issues
Metadata
Metadata
Assignees
Labels
product / authFixes and upgrades for the Appwrite Auth / Users / Teams services.product / avatarsFixes and upgrades for the Appwrite Avatars.product / consoleConsole, UI and UX issuesproduct / databasesFixes and upgrades for the Appwrite Database.product / functionsFixes and upgrades for the Appwrite Functions.product / messagingFixes and upgrades for the Appwrite Messaging.product / migrationsFixes and upgrades for the Appwrite Migrations.product / sitesFixes and upgrades for Appwrite Sites.product / storageFixes and upgrades for the Appwrite Storage.product / vcsFixes and upgrades for the Appwrite VCS.
Activity
ChiragAgg5k commentedon Oct 14, 2026
Released in Appwrite 2.5.0 (includes #14309).
feat(console): lock cron schedules on plans that only allow intervals
ChiragAgg5k commentedon Oct 19, 2026
Step 2 (cron gate re-land, appwrite-labs/cloud#6636) released in cloud 1.51.13.