Skip to content
Discussion options

You must be logged in to vote

Applies to: any version — this is how the project works by design.

Scheduled work must not depend on a task that outlives its request. Vercel can suspend the process between requests. The host target is long-running, but the project still uses an external tick for scheduled work. Local bot polling is a separate lifespan task.

Everything on a clock goes through the tick, GET|POST /api/v1/cron/tick (tick in server/app/api/cron.py). An external cron service calls the tick every five minutes with X-Cron-Secret. To add a job:

  1. Write the job as a function in services/. Call it from tick.
  2. Decide what to do from the stored state: what is due by the class's own clock and not yet done today. Never …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lumenpearson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area:server for:contributor Whoever changes the code or the documents: setup, checks, where a change goes
1 participant