[How to] Set up a CRON job via CPanel

Started by Xhanch Studio, March 03, 2011, 11:34:53 AM

previous topic - next topic
Go Down

Xhanch Studio

March 03, 2011, 11:34:53 AM Last Edit: June 10, 2011, 07:27:54 PM by Xhanch Studio
CRON is used to run a command on a period of time (recurring)

Here is the basic structure of CRON syntax

Code Select
# +---------------- minute (0 - 59)
# |  +------------- hour (0 - 23)
# |  |  +---------- day of month (1 - 31)
# |  |  |  +------- month (1 - 12)
# |  |  |  |  +---- day of week (0 - 7) (Sunday=0 or 7)
# |  |  |  |  |
  *  *  *  *  *  command to be executed


Here are some samples of CRON syntaxes

Code Select
45 * * * *  /usr/bin/lynx -source http://example.com/cron.php
45 * * * * /usr/bin/wget -O - -q -t 1 http://www.example.com/cron.php
45 * * * * curl --silent --compressed http://example.com/cron.php


In CPanel, you can find out how easy it is to set up a CRON.
On your CPanel, you can find "Cron jobs" menu.
On "Add New Cron Job", you just need to determine the CRON interval (you can use a predefined interval from the "Common
Settings" drop down) and put your command.

Best Regards,
Susanto B.Sc
----------------------------------------------------------------------------
Web development services, WordPress plugin and theme development, PSD to XHTML conversion - http://xhanch.com
Read free manga online - http://authrone.com

Go Up