A Glance at cPanel - Cron Jobs for Automation of Tasks

Author: Web Design / e-Hosting
We specialize on hosting solution, server solution and web solution. Besides providing web hosting and web & graphic designing services, we are also able develop custom web-based solutions, e-commerce hosting and custom web programming.

One of the many wonderful things about using cPanel is that it helps website owners automate many basic website administering functions. The cPanel has a feature called the Cron Job that lets website owners to set the server to automatically do a set of tasks. Setting up Cron jobs allow website owners to save precious time and energy.

A Cron job is a long running process that executes specific commands at a given time. Setting up Cron jobs can help you do repeated tasks that you may not feel like doing everyday, for example backing up the files on your server. You can also use Cron jobs to regularly update your RSS feeds if your website supplies them. Setting up a Cron job can be done by using UNIX command or by using cPanel. The later is typically easier.

To set up your own Cron job, first you need to log in to your cPanel account. Next, click on the cPanel Cron Jobs menu to begin. Your browser should then load the Standard Cron Manager page. Creating a Cron job in cPanel is fairly easy and only takes three simple steps:

  1. First, input your e-mail address in the given field. After the Cron job executes a task, the result will be sent to you so you will know if there are any errors.
  2. In the Command to run field, input the path to your desired script. If you want to run a PHP file, input php followed by a space and the path to your script. If you want to run an automatic backup script, you need to type /bin/sh followed the path to your script.
  3. Next, set your schedule. You can set the minute, hour, day, weekday and month of your Cron job. Remember, the shorter the interval you set, the more often you will receive e-mails informing you whether your scheduled task has been executed successfully. It is advised that you set a short interval so that you can quickly receive a notification e-mail. This is so that if there are any errors, you can go back and check your settings.

Once you have finished the three steps above, your Cron job is done. Click on the Save Crontab button to save your Cron job.

Now that you know how to set up Cron jobs, you can try to set one on your own. Thank to cPanel, hopefully doing regular but time consuming functions like backing up files should be easy.

Filed under: Tutorial, ,

2 Responses

  1. saurabh Says:

    after setting cron job in it ill get error : no such file or directory please help me out.

    Posted on January 3rd, 2009 at 6:23 am

  2. administrator Says:

    what kind of error did you get?

    Posted on January 4th, 2009 at 5:14 am

Leave a Reply