Setting up cron job in cpanel

Note: xxxxx replace this by in backend configuration of Invitex "Private Key to Authorize Cron Job"

A. On Linux Based Server Environments

On most Linux server environments, you can simply run the command below as often as you are comfortable. We recommend that you run it every 30 minutes or less. On a busy site, you might want to run it every 10 minutes. The more frequent you run it, the less load it will be on the server, but the invite sending will also be faster.

lynx -source "http://domain.com/index.php?option=com_invitex&task=mailto&pkey=xxxxx" > /dev/null

lynx is a text-based browser that is installed in most hosting environments. If you do not have lynx installed, you can use other alternatives such as wget as below,

wget -O /dev/null "http://domain.com/index.php?option=com_invitex&task=mailto&pkey=xxxxx" > /dev/null

A Cron job can be setup using the command line in any of the ways above.

Setting up cronjob in CPanel 11

To add a new cronjob in CPanel 11 variants, login to your CPanel and click on the "Cronjobs" link under the "Advanced" section as the screenshot below.

Image:cronjob1.jpg

Upon clicking on the cronjobs, you will then be directed to a page similar to below. In this example, click on the "Standard" button to proceed.

Image:cronjob2.jpg

Then on the screen below, enter the following options,

Command to run: lynx -source "http://domain.com/index.php?option=com_invitex&task=mailto&pkey=xxxxx" > /dev/null

OR

Command to run:
wget -O /dev/null "http://domain.com/index.php?option=com_invitex&task=mailto&pkey=xxxxx" > /dev/null

 

- Select every 5 minutes, every hour, every day, every month and every weekday so that the action above will be executed every 5 mins of the day, in any given month.

Image:cronjob3.jpg

 

 

Setting up Cron Job using Terminal (cron tab)

If you are setting cron job using terminal you need to pass user agent and header

For example to set cron for every 10 minutes the command you need to set is as given below

*/10 * * * * wget -q --header="Accept: text/html" --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0" "http://domain.com/index.php?option=com_invitex&task=mailto&pkey=xxxxx" &> /dev/null

http://techjoomla.com/images/oldimages/stories/documentation/invitex/admin/invitex_Oi_config.png