In this article, we will attempt to guide you through setting up and understanding what a cron job is, and how to set one up. We will assume that you have already logged into your control panel. If you have not done so, please do so, and find the Cron Jobs section, clicking on it
Cron jobs allow you to automate certain commands or scripts on your site. You can set a command or script to run at a specific time every day, week, etc. For example, you could set a cron job to delete temporary files every week to free up disk space.
Warning: 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. Creating a cron job that enables your account to abuse our servers may cause your account to be suspended.
How to setup a cron job?
In order to setup a cron job, you must first be logged into your control panel.
Once there, click on the cron job link
Your best bet is to use the Common Settings. You can choose from a variety of options
For example, if you chose the twice daily option, you would see
Make sure that you get the path to your command right, and add it in the 'command' field.
Common Mistakes
Setting up a cron job can be tricky business. There are a few mistakes that are quite commonly made though, which you should try to avoid #1: More often is not always better
Most commands don't need to be run every 60 seconds, or even every 2-3 hours. In most cron jobs, once or twice a day is plenty. As with anything, overuse is not always a good thing
#2: Use the full path
Don't assume the system knows you want to utilize php. Make sure the system knows you want to utilize php, with something like