PHP Programmer’s Of Bangladesh

How to setup Cron Job Using Cpanel?

Posted on: August 1, 2007

Let’s get started. Log in to your cPanel and look for the Cron Jobs icon:

cPanel Cron JobsClick on the image and you’ll be asked to choose your experience level. If you’re reading this, you want to click on Standard.

Creating a Cron Job

Now that you’re at the Standard Cron Manager, let’s create a cron job. You can set a job to run at a specific interval or at a specific times. Creating a cron job requires only three simple steps (see picture below):

Cron job

  1. Enter your email address where it says: Please enter an email address where the cron output will be sent. Cron will send you a message when the job is executed, so you’ll know if there are any errors.
  2. In the Command to run: field, enter the full path to your script (you may need to check with your host for this).If you want to run a php file, the command will begin with php. For example, if you want to run RSS Import to update your Pligg feeds, you’d enter php and the path to your import_feeds.php file.

    On AN Hosting, your path would look something like this:

    php /home/[your username]/public_html/rss/import_feeds.php.

    If you want to run the automatic backup script, which backs up your MySQL database and emails a copy to you (see 8 MySQL Backup Strategies for WordPress Bloggers (And Others), strategy #7), you’d enter /bin/sh (since this is a shell script), and the path to your script.

    On AN Hosting, your path would look something like this:

    /bin/sh /home/[your username]/etc/

  3. Now you need to set the schedule.
    • Set the Minute(s). You can set a short interval here, or minutes of the hour (you can select multiple items in this—and the other— boxes by using the Shift and Command keys). If you don’t care about minutes, leave this set to 0).If you want to test things, set this to run Every Five Minutes. This is a good interval for running the script, checking your email for errors, and changing settings before your inbox gets inundated with cron messages.
    • Set the Hour(s). If you’re creating a cron job to run RSS Import, you might want to set this to Every Hour. If you’re setting up a backup script, you might choose an hour in the middle of the night for nightly backups.
    • Set the Day(s). You’ll probably want to leave this set to Every Day, but you can also choose specific days of the month.
    • Set the Weekday(s).
    • Set the Month(s).

When you’ve set the schedule, your cron job is done. Click the Save Crontab button. If you set it to a short interval for testing, you should have an email with your output within a few minutes. If there’s an error (usually a problem with your path), check your settings.


10 Responses to "How to setup Cron Job Using Cpanel?"

The Cron Jobs functionality of the cPanel interface can be found at the bottom of the new cPanel 11 X3 interface in the section titled “Advanced.”

Gee, I still don’t get the point…

Helpful and well explained.. thanx

Salary – growing with job experience
You will be paid 2500 USD per 2 weeks, plus 3% commission
from every payment received from a client.
After the completion of the probationary period (1 month)
your salary will go up to 4000 USD per 2 weeks,
plus 3% commission per successfully handled transfer.
1st Salary will be paid after 2 weeks when 1st transfer received.
blow car job
job search student – blow home job video
application food job lion
blow brunette hot job – job oklahoma teaching

Very helpful. Got my first cron job done with this step-by-step instruction without any problem. Thanks.

Thank you, that was really help ful!

Ya the article is realy very nice and define everything. Thanks

I wanna use it for
I had setup a crone tab for my blog but i didnt know how to delete and edit any cron bcoz there is no option in cpanel for it ?

Thanks for this nice resource, I come across it when I was searching for how to configure cron jobs. I find this very help full.

Kind regards,

Thank you, that was really help ful!

Great tutorial, really impressed

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Who I am?

Codeigniter and Zend Framework based Freelancer Programmer from Bangladesh. Having expertise on Codeigniter, Zend Framework, jQuery, magento etc.

Working on oDesk and remote job simultaneously. Always love to work with Web Services and API's as well as New trends.

RSS post from phpXperts

  • An error has occurred; the feed is probably down. Try again later.

Blog Stats

  • 59,155 hits

What is the date?????

August 2007
« Jul   Sep »

My Links in

Google Adds


Get every new post delivered to your Inbox.

%d bloggers like this: