Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

A cron job is a scheduled task or automated job that runs at specified intervals on Unix-like operating systems. The name “cron” comes from the Greek word “chronos,” meaning time, and it is a time-based job scheduler in Unix and Unix-like operating systems.

Cron jobs are managed by the cron daemon, which is a background process that executes scheduled tasks at the predetermined times or intervals. These tasks can include running scripts, executing programs, or performing system maintenance activities.

Here’s the basic structure of a cron job:

* * * * * command-to-be-executed
| | | | |
| | | | +----- Day of the week (0 - 6) (Sunday = 0 or 7)
| | | +------- Month (1 - 12)
| | +--------- Day of the month (1 - 31)
| +----------- Hour (0 - 23)
+------------- Minute (0 - 59)

Each asterisk (*) represents a wildcard, meaning “every” for the respective time unit. For example, if you have * * * * * as the schedule, it means the command will run every minute. You can replace the asterisks with specific values to set a more precise schedule.

For example, a cron job to run a script every day at 2:30 PM would look like:

30 14 * * * /path/to/your/script.sh

To create or edit a cron job, you can use the crontab command. For example, to edit your user’s cron jobs, you can run:

crontab -e

This opens your user’s crontab file in an editor where you can add or edit your scheduled tasks.

crontab -l

To see a list of active, scheduled tasks. You can run:

Cron jobs are an essential tool for automating routine tasks on Unix-based systems, making them a fundamental part of system administration and automation.