Forgot?

Ninja RSS to Content

How Do I Set Up a Cron Job?

The steps to setting up a Cron job varies between web hosts. Here, we will show you two methods... first if you're using Dreamhost, second if you're using Cpanel (hostgator, hostmonster, bluehost, etc.)

For both scenarios (Dreamhost or Cpanel), the first two steps are the same:

Step 1:
First, copy the url from the "Test Cron" in the backend. I'm going to call this the Cron URL from here on out.

Step 2:
Second, edit your .htaccess file (should be right there in your joomla root) to add a 301 redirect. You need to do this because Cron at Cpanel and Dreamhost don't seem to like parameters being passed easily. Here's what that should look like:

redirect 301 /ninjarsscron http://www.YOUR_DOMAIN.com/index.php?option=com_ninjarsstocontent&key=BIG_NUMBER_FROM_THE_CRON_URL_YOU_JUST_COPIED&format=raw

This will basically convert the url http://www.YOUR_DOMAIN.com/ninjarsscron to the url with all the fun parameters we need.

Step 3:
Now all we need to do is create the cron task.

Here's how it looks in Cpanel:
Go to "Cron Jobs" in the "Advanced" pane. Where it says "Add New Cron Job" enter the following in the "Command" field:

wget -O - -q -t 1 http://www.YOUR_DOMAIN.com/ninjarsscron

Adjust whatever else you want to in the settings, then save the cron job by clicking "Add New Cron Job".

And here's how it should look in Dreamhost:
Go to "Goodies > Cron Jobs" and click "Add New Cron Job". In the field "Command to Run" enter this code (using your domain name, of course):

wget -O - -q -t 1 http://www.YOUR_DOMAIN.com/ninjarsscron

Adjust whatever else you want to in the settings, then save the cron job by clicking "Add".

Test it a bit, but that's it!
This HowTo was provided by stevebab in a forum post.

Home FAQ Ninja RSS to Content