What Is a Cron Job? Scheduling Basics Explained
What is a cron job?
A cron job is a task scheduled to run automatically at specified times or intervals on a Unix-like operating system. The name comes from "chronos" (Greek for time), and the cron daemon — the background process that executes these tasks — has been a Unix staple since Version 7 in 1979. If you've ever needed a script to run every morning at 6 AM, a database backup to happen every Sunday at midnight, or an API to be polled every 15 minutes, a cron job is the traditional answer.
Cron jobs are the foundation of scheduled automation. Every modern automation platform, from cloud schedulers to AI workflow tools, descends conceptually from cron. Unlike generic AI automation posts, this guide shows real CodeWords workflows — not just theory.
The Linux Foundation's 2024 report noted that over 90% of cloud workloads run on Linux. Most of those systems use cron or a cron-compatible scheduler for recurring tasks. Understanding cron syntax remains a fundamental skill even as higher-level tools abstract it away.
Related: cron job last day of month, workflow automation tools, what is a workflow engine, automation platform, AI workflow automation, CodeWords integrations, CodeWords templates.
How cron syntax works
A cron expression uses five fields separated by spaces:
┌───────── minute (0–59)
│ ┌─────── hour (0–23)
│ │ ┌───── day of month (1–31)
│ │ │ ┌─── month (1–12)
│ │ │ │ ┌─ day of week (0–7, where 0 and 7 = Sunday)
│ │ │ │ │
* * * * *
Each field accepts specific values, ranges, steps, and wildcards:
0 9 * * 1-5— 9:00 AM, Monday through Friday*/15 * * * *— every 15 minutes0 0 1 * *— midnight on the first of every month30 14 * * 0— 2:30 PM every Sunday
The asterisk means "every possible value." Ranges use hyphens, lists use commas, and steps use slashes. The POSIX specification defines the exact behavior, though most modern implementations add extensions like @daily, @weekly, and @hourly.
What cron can't do
Cron has clear limitations that matter for automation:
No dependency management. Cron fires at the scheduled time regardless of whether the previous run finished. If your job takes 2 hours and runs hourly, you get overlapping executions. There's no built-in locking.
No failure recovery. If a cron job fails, cron doesn't retry. It fires again at the next scheduled time. There's no concept of "this run failed, try again in 5 minutes."
No variable scheduling. Cron can't express "last day of the month" or "third Tuesday" natively. Workarounds exist (see cron job last day of month) but they're hacks — conditional wrappers around the real job.
No state. Cron doesn't know what happened in the last run. If your job needs to process only new records since the last execution, cron can't help — your script has to manage its own state.
These limitations are why modern workflow engines and automation platforms exist. They solve the problems cron deliberately left unsolved.
Modern alternatives to cron jobs
Cloud schedulers like AWS EventBridge, Google Cloud Scheduler, and Azure Logic Apps offer cron-compatible syntax with managed infrastructure. They add retries, dead-letter queues, and monitoring dashboards. But they still operate at the trigger level — they tell your code when to run, not how to handle failures or state.
Workflow orchestrators like Apache Airflow, Prefect, and Temporal replace cron with DAG-based scheduling. Tasks have dependencies, retries, and state management built in. Overkill for simple scheduled scripts, essential for multi-step data pipelines.
AI automation platforms like CodeWords abstract scheduling entirely. Tell Cody "run this every weekday at 9 AM" or "run this on the last business day of each month" and get a serverless workflow with proper scheduling, retries, and state persistence via Redis. No crontab editing, no server maintenance.
Platforms like Zapier and Make offer scheduled triggers with polling intervals. n8n supports cron expressions directly. Pipedream offers cron-based scheduling with managed infrastructure.
When you still want a cron job
Cron remains the right choice for single-server tasks that are simple, self-contained, and don't need monitoring: log rotation, cache clearing, local backups. If the task runs on one machine, takes seconds, and failure just means it runs again next time — cron is perfect. Don't over-engineer it.
For everything else — multi-step workflows, cross-service integrations, AI-powered processing, and anything that needs to be observable — use a platform built for it. CodeWords offers templates for common scheduled patterns and transparent pricing for execution-based billing. Describe your schedule to Cody and let the platform handle the rest.



