Quantcast
Channel: Urban Yoda » Sage Adams
Viewing all articles
Browse latest Browse all 10

How to Setup Elysia Cron for Drupal 7 on a Bluehost Shared Hosting Account

$
0
0

The topic of the day is using Elysia Cron on a Bluehost shared hosting account with Drupal 7.

It’s sometimes important not to use the basic Drupal cron feature however because of two problems it causes:

  1. Cron runs when it wants and all cron tasks run at the same time, slowing your site down in the process.
  2. Cron runs based on user interaction with your site; so some unlucky user (or group of users) is going to get ‘fortunate’ enough to access your site and get cronned, dramatically slowing down their experience.

Elysia cron solves these problems in theory because with this module you can chunk out different tasks and have them run at different intervals. You can have more expensive and less immediate cron tasks run once per day or week, in the middle of the night, and you can have the search index for instance update every 15 minutes.

However, setting it up on your site is not as straightforward as just installing and enabling the module. I’m going to show you HOW to do it the easy way in this blog post.

Set up Elysia Cron

First, go get the module. Install and enable it the same way you install and enable all modules.

Once installed go to the configuration page for the module in Admin > Configuration. It’ll be called ‘Cron Settings’ and it will already have replaced your default ‘Cron’.

Go the ‘Settings’ tab and open ‘Installation Settings’. Make sure to select ‘Never / Use External Crontab’ from the drop-down menu under ‘Run cron on visitor’s requests, every’.

Copy your Cron key to a text editor.

Under ‘Default Schedule Rule’ input the default time items will run on a daily basis. Use the ‘Click for help and Cron Rules and Script Syntax’ directions to fill this out appropriately.

Now, scroll down to ‘Single Job Settings’ and choose the frequency with which you want each task to run.

Setup Bluehost Cron Job

Second, login to your Bluehost cPanel. Search for ‘Cron’. Click on the only option available to you ‘Cron Jobs’.

Customize the following line to match your site:

curl http://yoursiteurl/sites/all/modules/elysia_cron/cron.php?cron_key=thekeyyoucopiedpreviously > /dev/null 2>&1

Replace ‘yoursiteurl’ with your site, for example www.yoursitename.com. Replace the path to Elysia cron with the correct path if you put it in a different folder. Replace thekeyyoucopiedpreviously with the key you copied previously in Drupal 😉

/dev/null 2>&1 ensures you don’t get emails every minute.

Paste that into the ‘Command box’. Under Common Settings choose ‘Every Minute’.

Click ‘Add New Cronjob’.

That’s it, you should be good to go now.

Image courtesy of Flickr: https://www.flickr.com/photos/gumara/2299148345

Viewing all articles
Browse latest Browse all 10

Trending Articles