Select the types of activity you want to include in your feed.
flora is a fast and secure runtime that lets you write discord bots for your servers, with a rich TypeScript SDK, without worrying about running infrastructure. [mirror]
···4455# Limitations
6677-This page documents known limitations and design trade-offs in the Flora runtime.
77+This page documents known limitations and design trade-offs in the flora runtime.
8899## Cron Jobs
1010···2121| `is_running` flag | No | Reset to `false` |
2222| Execution history | No | No audit trail |
23232424-### Why This Is Usually Fine
2424+### Why this is usually fine
252526261. **Scripts reload on startup.** When the runtime starts, it loads all deployments from the database and executes them. Your `cron()` calls run again, re-registering all jobs.
2727···292930303. **Redeployment clears old jobs.** When you deploy a new version of your script, the runtime clears all cron jobs for that guild before loading the new script. This prevents stale jobs from lingering.
31313232-### Edge Cases to Be Aware Of
3232+### Edge Cases to be aware of
33333434**Duplicate execution on crash:** If the runtime crashes while a cron job is executing, the `is_running` flag is lost. On restart, the job may run again if it's due. Use `skipIfRunning: true` and design handlers to be idempotent where possible.
3535···42424343**Schedule drift:** If the runtime is down for an extended period, jobs won't "catch up" on missed executions. A job scheduled for midnight won't run at 2 AM if the bot was down at midnight — it will wait for the next midnight.
44444545-### When You Need More
4545+### When you need more
46464747If your use case requires:
4848···5050- **Catch-up runs** after downtime
5151- **Non-idempotent side effects** (billing, one-time notifications)
52525353-Consider implementing your own persistence layer using the [KV store](/sdk#kv-store) to track execution state:
5353+Consider implementing your own persistence layer using the [KV store](/docs/sdk#kv-store) to track execution state:
54545555```ts
5656cron('critical-job', '0 * * * *', async () => {
···6262 return
6363 }
64646565- await performCriticalWork()
6565+ await performCriticalWorkIdk()
6666 await kv.set('critical-job:last-run', now)
6767})
6868```
···8282| Cron timeout | 5 seconds |
8383| Boot timeout | 10 seconds |
8484| Max cron jobs per guild | 32 |
8585-8686-These can be adjusted via runtime configuration but are not exposed to end users.