Scheduled job never runs live? Check cron

You built a job that should run on a timer: a nightly digest email, a cleanup of expired trials, a booking reminder. You tested it by calling it by hand, it worked, and you shipped. A week later someone asks why the digest never arrived. Nothing errored, nothing crashed, and the site itself looks perfectly healthy. The job simply never ran.

The symptom

Scheduled work fails quietly. No visitor is involved, so there is no broken page. Typical signs:

  • Emails or reports that should go out daily stop arriving, or never started.
  • The job works every time you trigger its URL or function yourself.
  • Logs for the function show your manual test runs and nothing else.

The cause

A schedule needs something outside your code to wake it up on time. AI builders write the job well, but the trigger lives in a host setting, config file or database extension, and is easy to miss. Common causes:

  1. A timer inside server code. Code like setInterval or a node-cron library only runs while that process stays alive. Serverless functions and hosts that scale to zero stop the process between requests, so the timer never fires.
  2. The schedule only exists in preview or development. A cron job created in a development database, or a schedule that only applies to production deployments, will not run where you expect.
  3. The trigger is rejected. The scheduler calls your endpoint, but the endpoint demands a login token or a secret the scheduler does not send, so every run ends in a 401 that nobody reads.
  4. The schedule is not what you think. Cron expressions are usually read in UTC, and a typo such as swapping the minute and hour fields can push a job to a time you never check, or to a date that never comes.
  5. The job starts but dies. Scheduled functions often have short time limits. A job that loops over every user can hit the limit and stop halfway, every time.

Step-by-step diagnosis

  1. Find the trigger. Ask exactly what wakes this job up. If it is a timer inside your own server code, that is likely the problem.
  2. Check where the schedule lives. Confirm it exists in the production project or production deployment, not only in a preview, branch or development environment.
  3. Read the run history. Most schedulers list past runs with status codes. No runs points to setup; failed runs point to authentication or code errors.
  4. Call the endpoint the way the scheduler does. Use the same method, headers and URL from outside your browser session. If it returns 401 or 403 for you, it does for the scheduler too.
  5. Translate the cron expression. Paste it into a cron explainer and convert the time from UTC to your own zone.

Fixes per builder or host

Lovable and Supabase-backed projects

Scheduled work usually runs through the pg_cron extension, often calling an Edge Function with pg_net. Check that the job exists in the production project by querying cron.job, then look at cron.job_run_details for failures. If the function expects a JWT, make sure the job sends a valid Authorization header, or turn off JWT verification for that function and check a secret of your own instead.

Bolt and Netlify

Netlify scheduled functions declare their schedule in the function's config. They run only on published production deploys, not on deploy previews, and they have a short execution limit, so keep each run small or hand long work to a background function.

v0 and Vercel

Vercel cron jobs are defined in vercel.json under crons, each with a path and a schedule. They only fire on the production deployment, and the free plan limits how often and how precisely they run, so check the current limits for your plan. If you protect the route with a CRON_SECRET environment variable, check for the matching Authorization header rather than a user session.

Replit

An always-on loop in an Autoscale deployment stops when the deployment scales down for lack of traffic. Use Replit's Scheduled Deployment type for timed work, or a Reserved VM if the job truly needs a long-running process.

Cursor and hand-built projects

Use your host's scheduler, or an external cron service that calls a protected URL.

How to verify

  • Set the schedule to run every few minutes temporarily, watch at least two runs succeed in the run history, then set it back.
  • Confirm the side effect, not just the log line: the email arrived, the rows changed, the sync record updated.

Prevention

  • Write a heartbeat. At the end of each successful run, save a last_run_at timestamp. Anything older than the schedule allows means the job is stuck.
  • Expose that heartbeat. A small status endpoint that returns an error when last_run_at is too old lets any uptime monitor catch a silent job.
  • Keep runs short. Process work in batches so one slow run cannot hit the time limit every night.

Run the free 30-second check on your live URL to make sure the parts visitors see are healthy while you fix the parts they don't.

Run the free 30-second check

← All posts

FlowCanary on SaaSHub