Cron Job
intermediateDefinition
A task scheduled to run automatically at set times, like a recurring alarm. The schedule is defined in 'cron syntax': a compact format that specifies minutes, hours, days, months, and weekdays. Cron jobs run whether or not anyone is watching.
In the wild
'0 9 * * 1' means 'run at 9:00 AM every Monday.' You might schedule a cron job to email a weekly report, clear temporary files every night, or check for software updates every hour.
More from Automation & Scripting
Dry Run
Running a script or command in preview mode so you can see what it would do without actually doing it. Dry runs are a safety net. They let you verify the plan before committing to changes that might be hard to undo.
Environment Variable
A named value set outside your code that programs can read at runtime. They're used for configuration that changes between environments, like API keys, database URLs, or feature flags, so you don't hardcode secrets into your source code.
Exit Code
A number a program returns when it finishes to signal whether it succeeded or failed. An exit code of 0 means success; any other number means something went wrong. Scripts and pipelines use exit codes to decide whether to continue or stop.
Idempotent
An operation that produces the same result no matter how many times you run it. Idempotent scripts are safe to re-run: if something fails halfway through, you can run the whole script again without creating duplicates or breaking things.
Pipeline
A series of automated steps that data or code flows through, where the output of one step becomes the input of the next. Pipelines ensure tasks happen in the right order and can stop early if a step fails.
Script
A file containing a sequence of instructions that a computer runs from top to bottom. Unlike interactive programs, scripts typically run without user input. You start them and they do their thing. They're the backbone of automation.