Home / VPS & Dedicated / What is a Cron Job?

What is a Cron Job?

Crontab
Question: What is a Cron Job?

Answer:

A cron job is a periodic script run using scheduling software called “cron”. Linux and other Unix-like operating systems use it. A shared web hosting provider may allow you to run local user cron jobs, and those settings are usually accessible through your web-based control panel. If not, you can ask your host to make an exception for you for something that you must run.

Cron jobs are good for recurring events, such as payment processing, data reports, etc. Many PHP and CGI applications that require recurring events to take place when you are not logged in, can rely on cron to execute them.

In most Linux distributions, you can find the cron configuration in /etc/crontab. Some distributions, including CentOS, also include cron.daily, cron.hourly, cron.weekly. These are folders configured to run the scripts found inside them at specific intervals. You will most likely have access to this only if you have a dedicated server. To add scripts to it, simply create a symbolic link from your script to the cron folder of your choice.

Photo: Flickr

Check Also

servers

Importance of web hosting to business

The world of business is very ruthless and unfair in some cases. It is a …