Skip to content

Cron

Easy — everyone uses thisGeneral Dev

ELI5 — The Vibe Check

Cron is a scheduler that runs your code automatically at set times. Like a kitchen timer — set it once and it fires every hour, every day at midnight, or every Monday morning. Perfect for jobs that need to happen regularly without a human pressing a button.

Real Talk

Cron is a Unix-based time-based job scheduler. Jobs are defined in a crontab file using a five-field expression (minute, hour, day, month, weekday) that specifies when to run a command. Modern equivalents include GitHub Actions schedules, cloud task queues, and serverless cron.

Show Me The Code

# Run backup at 2am every day
0 2 * * * /scripts/backup.sh

# Run cleanup every Sunday at midnight
0 0 * * 0 /scripts/cleanup.sh

When You'll Hear This

"Set up a cron job to purge expired sessions every night." / "The cron ran but the script failed — check cron logs."

Made with passive-aggressive love by manoga.digital. Powered by Claude.