How to setup your Cron Job for Dolphin - Shared Hosting

Cron Jobs are a very important part of the Dolphin installation. They control actions such as video processing, mass mailing, and data migrations just to name a few. The most common issues I have seen regarding improper setup of Cron Jobs are "Videos not processing" or "Mass Mailer doesn't work". So in this tutorial, I will show you the most common way(s) of setting up your Cron Job, so let's get started!

During the installation procedure, you will be given the option to "copy" the Cron command needed in order to setup your Cron job for Dolphin. It will look something very similar to this:
* * * * * /usr/local/bin/php -q /home/sitedir/www/d70/periodic/cron.php

Of course not all Hosting configurations are the same, especially in a "Shared Hosting" environment. Since most issues occur with members who run their Dolphin site on a Shared Hosting package, I will focus on this topic during this tutorial.

In order to configure your Cron Job, you must first login to your cPanel or Plesk interface that controls your website. You will then need to double click the icon that is labeled Cron Jobs (see image below):

From within the configuration setup screen (see image below), you will be able to setup your Cron by doing the following:

  1. Enter an email address (if needed) to indicate where to send the Cron job notifications.
  2. From the Common Settings drop down menu, choose your time intervals for your Cron to run. Most common is * * * * * (Every minute)
  3. Enter the command provided from the installation.
  4. Once all the information is entered, click the Add New Cron Job button. If successful, you should now see your Cron listed under "Current Cron Jobs".

As stated previously, not all Hosting configurations will accept the default Cron command provided during installation. Below are the most popular Cron job commands used in a Shared Environment:

  1. * * * * * /usr/local/bin/php -q /home/sitedir/public_html/periodic/cron.php
  2. * * * * * /usr/bin/php -q /home/sitedir/public_html/periodic/cron.php
  3. * * * * * /usr/local/bin/php4 -q /home/sitedir/public_html/periodic/cron.php
  4. * * * * * /usr/local/bin/php5 -q /home/sitedir/public_html/periodic/cron.php
  • to find your exact /home/sitedir/public_html/ edit your /inc/ and look for

I have also found that some Crons (depending on your host) have difficulties "calling" the cron job to run. I have been able to resolve this by specifying the location of the php.ini configurations and manually entering it into the cron job command: (See below)

  • * * * * * /usr/bin/php -c /home/sitedir/public_html/php.ini -q /home/sitedir/public_html/periodic/cron.php

How to run your Con Job Manually

There is a way to manually execute the cron job also, by renaming the .htaccess file located in the /periodic folder to something like .htaccess.old. You can then manually run the cron job by physically typing in the location in your browsers address bar. Example:

  • You will want to make sure you have cleared the /cache (except for .htaccess) and /public_cache directories.
  • When you navigate to your, you WILL GET A BLANK PAGE. This is normal. If you see that this page loads instantly, try clearing the cache as explained above and try again. The page SHOULD load for at least a couple of seconds.

Before manually running your cron job, please verify that your cron job settings are correct. Also, if you have renamed your .htaccess file during this process, make sure you rename it BACK.

Last modified 12 years ago Last modified on Dec 13, 2010, 4:05:29 AM