HostMonster Web Hosting Help

Cron Job Basics

Summary

This article will provide an overview of what Cron Jobs are. If you are unfamiliar with Cron Jobs, please read this carefully as Cron Jobs are a more advanced feature of your account. If you are familiar with Cron Jobs and simply want instructions on using Cron Jobs, please refer to this list of Cron Job articles:


What is a Cron Job?

A Cron Job is a Linux command for scheduling a task (command). Cron Jobs allow you to automate certain commands or scripts on your server to complete repetitive tasks automatically.

This can be a very resourceful tool as a Cron Job can be set to run by the minute, hour, day of the week, day of the month, month, or any combination of these.

For example, you could set a Cron Job to delete temporary files every week so that your disk space is not being used up by unnecessary files. Some scripts, such as Drupal, may even require you to set up a Cron Job to perform certain functions.

WARNING! It is important that you familiarize yourself with how Cron Jobs work. You need to have a good knowledge of Linux commands before you can use Cron Jobs effectively.

Check your script with your hosting administrator before adding a Cron Job.

For most Cron Jobs, there are three components present:

  1. The script that is to be called or executed.
  2. The command that executes the script on a reoccurring basis. This is typically set in the cPanel.
  3. The action or output of the script, which depends on what the script being called does. Frequently, scripts called as a Cron Job modify files or databases, however they can perform other tasks that do not modify data on the server, like sending out email notifications.
Most scripts that require the use of a Cron Job will give you specific instructions on what needs to be setup, frequently giving examples.

For additional information on Cron Jobs, use the following resources:

http://en.wikipedia.org/wiki/Cron (Basic)
http://www.unixgeeks.org/security/newbie/unix/cron-1.html (Advanced)

Video "How-to" Tutorial 141,486 views bookmark tags: cpanelutilities cron (updated 8 days ago)


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

How do I upload my web site? (updated 430 days ago)
Knowledgebase Article 1,196,464 views tags: ftp site upload uploading web website

How do I publish my Web site using Publisher? (updated 1036 days ago)
Knowledgebase Article 97,730 views tags: ftp microsoft publisher publishing site web

Script executed with a cron job requires a specific php.ini file to be used. (updated 811 days ago)
Knowledgebase Article 75,826 views tags: command cron cronjob crontab custom line optimizer php zend

Related Help Content

This article will explain how to setup, remove, or edit a Cron Job. (updated 806 days ago)
Knowledgebase Article 152,082 views tags: cron crontab job

This article will explain how to run php and other file types using Cron jobs. (updated 157 days ago)
Knowledgebase Article 250,234 views tags: cron file jobs php

Redirects allow you to make a specific web page redirect to another page and display the contents of that page. Learn how to setup a Permanent (301 or Termporary (302) redirects. (updated 1249 days ago)
Video "How-to" Tutorial 248,338 views tags: cpanel cpanelutilities domain forward redirect

I created a website using BlueVoda and now I want help publishing it. (updated 1991 days ago)
Knowledgebase Article 88,766 views tags: publish site upload web website

How to restore individual files or folders with the Site Backup & Restore tool (updated 1354 days ago)
Knowledgebase Article 89,455 views tags: backup files folders restore site

How to run cron jobs at a specific "local" date and time. (updated 998 days ago)
Knowledgebase Article 35,992 views tags: cron time

How to backup all of your MySQL databases using the Site Backup & Restore tool (updated 1355 days ago)
Knowledgebase Article 57,848 views tags: backup database mysql restore site

These steps will help you setup FrontPageĀ® to be compatible with different web browsers and to be able to publish using FTP, so that you don't have to rely on the FrontPageĀ® extensions. Select Tool (updated 655 days ago)
Getting Started Article 121,047 views tags: browsers frontpage select site