web hosting – Internetblog.org.uk https://www.internetblog.org.uk Web hosting, Domain names, Dedicated servers Fri, 29 Jan 2016 11:05:52 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.5 https://www.internetblog.org.uk/files/2016/01/cropped-favico-32x32.png web hosting – Internetblog.org.uk https://www.internetblog.org.uk 32 32 What is a Cron Job? https://www.internetblog.org.uk/post/474/what-is-a-cron-job/ Thu, 10 Sep 2009 16:27:44 +0000 http://www.internetblog.org.uk/post/474/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

]]>