A CronJob is a task that runs automatically in operating systems. The system regularly issues commands for these jobs. This can be a single task, but usually there are several complex tasks, i.e., several CronJobs. The advantage is that CronJobs can be highly individualized.
Each CronJob consists of three components:
- A Script that is to be executed
- A Command that will execute the script on a regular basis
- An Action or output of the script
Practical examples for its use are recurring server tasks. Among other things, newsletter distribution, statistical surveys or database cleaning are automatically initiated by CronJobs.
All operating systems that have a cron system or a cron daemon can use CronJobs. This includes all Unix and BSD (Berkeley Software Distribution) systems such as macOS or Linux.
The operating systems can have CronJobs run according to their motto “Command run on notice” at pre-set intervals. Routine tasks can therefore run completely independently from extra user input. In addition to an operating system with a cron daemon, the following prerequisites must be present for CronJobs to be set up: