How can I change my cpanel username?
August 4, 2012
Cant I log into my cPanel WHM or webmail
August 8, 2012

Cron Jobs

What is a Cron Job?

A cron job is a Linux command for scheduling a command or script on your server to complete repetitive tasks automatically. Scripts executed as a cron job are typically used to modify files or databases; however, they can perform other tasks that do not modify data on the server, like sending out email notifications.

For example, you can 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.

Time Intervals

Cron jobs can be a very resourceful tool as they can be set to run by the minute, hour, day of the week, day of the month, month or any combination of these. HostGator limits cron jobs on Shared servers to run in increments of no less than every 15 minutes since excessive cron jobs can cause unnecessary loads on the server.

What You Should Know Before Using a Cron Job

Warning: It is important that you familiarize yourself with how cron jobs work. You need to have a working knowledge of Linux commands before you can use cron jobs effectively.

For most cron jobs, there are three components present:

  • The script that is to be called or executed
  • The command that executes the script on a reccurring basis (typically set in the cPanel)
  • The action or output of the script (which depends on what the script being called does)

Most scripts that require the use of a cron job will give you specific instructions on what needs to be set up. If you are unsure, check your script with your hosting administrator before adding a cron job.