How to setup a cronjob in your cPanel

A cronjob is a command or task which is to be executed automatically at a certain time. Cronjob is a very useful tool when you want to run some scripts  automatically.

To setup a cronjob follow the steps.

1. Log into your cPanel.

2. Find the Cron jobs icon in advanced section. Click it and follow steps.

3. Enter an email address ( the cron output will be sent to this email )

4. Setup the time when the script to be executed.

5. Enter the full path to your script to be executed like

  php /home/[username]/public_html/send_mail.php


6. Click on the 'Add New Cron Job' button

Change [username] with your username and the path of your php script (send_mail.php) in above syntax.

If you have filled the Cron email box, An email will be sent when the cronjob runs. Or you can leave it blank if you dont want any email
How to setup a cronjob in your cPanel How to setup a cronjob in your cPanel Reviewed by JS Pixels on January 22, 2011 Rating: 5

No comments:

Altaf Web. Powered by Blogger.