$ man context-wiki/cron-jobs
Infrastructureintermediate
Cron Jobs
Scheduled automation that runs while you sleep
What Cron Jobs Are
Cron jobs are scheduled tasks that run automatically at specific times. Set it once, forget it. You define a schedule and a command. The system executes it on that schedule without any manual intervention. No alarms. No reminders. No "I forgot to run the tracker." The system handles it. The pattern is simple: automate the thing you keep forgetting to do manually.
CODE
Cron Syntax Decoded
Cron syntax looks cryptic but follows a simple pattern. Five fields: minute, hour, day-of-month, month, day-of-week.
0 20 * * * means "run at 8:00 PM every day."
0 9 * * 1 means "run at 9:00 AM every Monday."
*/30 * * * * means "run every 30 minutes."
0 0 1 * * means "run at midnight on the 1st of every month."
The asterisk means "every." The number means "at this value." The slash means "every N intervals." Once you read a few, the pattern clicks. You do not need to memorize it. You need to know enough to read existing cron schedules and ask Claude to write new ones.
PRO TIP
My Real Cron Jobs
Daily tracker runs every night at 8 PM. It scans git commits, counts content pieces, calculates output scores, generates a dashboard image, and logs everything. I never run it manually. I just check the results in the morning.
Website content auto-updates on a schedule. Blog posts, log entries, and vitals refresh without manual deploys. New content gets committed and pushed automatically.
Scheduled pushes to Vercel. A cron job triggers a git push, Vercel picks it up, and the sites rebuild. Content changes go live without me touching anything.
Each of these used to be a manual task I would forget. Now they just happen.
PATTERN
Where Cron Jobs Live
Cron jobs can run in multiple places. On your local machine (crontab). On a server. On Vercel (vercel.json cron configuration). On GitHub Actions (scheduled workflows).
For web-related automation, Vercel cron and GitHub Actions are the most reliable. They run even when your laptop is closed. Local crontab is fine for development and testing but not for production automation.
The Vercel approach: add a cron configuration to vercel.json, create an API route that handles the job, and Vercel triggers it on schedule. The GitHub Actions approach: create a workflow YAML with a schedule trigger, define the steps, and GitHub runs it. Both work. Vercel is simpler for web projects. GitHub Actions is more flexible for general automation.
knowledge guide
related entries