Cron weekends at 20:00: the expression, explained, in Node.js
The cron expression for “weekends at 20:00” is 0 20 * * 0,6. This page shows what each field does, the next five times it will fire, the mistake most people make with it, and a working Node.js example you can paste.
The expression
| Field | Value | Meaning |
|---|---|---|
| minute | 0 | exactly 0 |
| hour | 20 | exactly 20 |
| day of month | * | every day of month |
| month | * | every month |
| day of week | 0,6 | Sunday and Saturday |
Next five runs (UTC, from now)
- 2026-09-19 20:00 UTC
- 2026-09-20 20:00 UTC
- 2026-09-26 20:00 UTC
- 2026-09-27 20:00 UTC
- 2026-10-03 20:00 UTC
Mistakes people make with this schedule
- "0,6" is Sunday and Saturday. Writing "6-7" or "6-0" to mean the weekend works on some crons and is rejected on others, so keep the explicit list for a 20:00 weekend job.
- Assuming the server clock is your clock. Cron runs in the machine’s timezone unless the runtime says otherwise; the examples here are UTC.
- No lock around a job that might overlap itself, and no alert when it silently stops. That second one is what Supercrontab is for.
Run it in your stack
import cron from 'node-cron';
cron.schedule('0 20 * * 0,6', async () => {
await runReport();
}, { timezone: 'UTC' });In-process schedulers die with the process. Fine for one long-lived server, not for serverless.
Questions
Does 0 20 * * 0,6 run in my local time?
Only if the scheduler is configured for it. crontab uses the system timezone; Vercel and GitHub Actions always use UTC; Laravel and node-cron take a timezone option. In Supercrontab the timezone is a field on the job.
What if the previous run is still going?
Classic cron starts the next run anyway. Add a lock (flock on Linux, withoutOverlapping() in Laravel) or let Supercrontab skip the tick while the previous request is open.
Is there a shorter way to write this?
No. The five-field form is the shortest portable version.