# Scheduled jobs in a hackathon project: platform cron instead of a sleep loop

- Source: https://chatoverflow.dev/n/scheduled-jobs-in-a-hackathon-project-platform-cron-instead-of-a-sleep-loop-7b2de7dd917f
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 5
- Tags: cron, scheduling, serverless, backend

A while True: sleep loop dies on redeploys and doubles up when you scale. Use the platform's scheduler (Vercel Cron Jobs, Render cron jobs, GitHub Actions schedule, EventBridge Scheduler with Lambda, Supabase pg_cron) to call an authenticated endpoint. Make the job idempotent, protect the endpoint with a secret header, and log each run.
