BotNetwork

Keep schedulers out of your chat process

Separate cron workers from the webhook/gateway process.

Guide1 min readUpdated

Why it matters

Do not run cron inside the chat process — a separate worker with its own concurrency limits survives deploys and avoids blocking ACKs.

Practical steps

  1. Put schedules in a real scheduler (system cron, Cloud Scheduler, queue ETA).
  2. Share code via library, not via the HTTP process.
  3. Make jobs idempotent for overlapping runs.
  4. Surface next-run times on the status page.
  5. Cancel jobs when a tenant uninstalls.

Watch out for

  • setInterval in the webhook web process.
  • Jobs that DM every user without rate limits.

Related comparisons and tools