Interspire Product Knowledge Base

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Export to PDF

User Opinions (8 votes)

62% thumbs up 37% thumbs down

How would you rate this answer?



Thank you for rating this answer.

How do I set up CRON on my server using SSH?

In order to get started with cron, you must have a server that is currently running cron. Your host will also be able to tell you where you are able to setup crontabs -- whether it's from a web based control panel, or through a telnet terminal window.

Finding the necessary information

This section can be any command that can be run from a command line. In this case we are setting it up to run a script.
  • Path to PHP – UNIX and Linux have a special variable called env php which tells you where PHP is installed on your server. We'll use this instead of trying to figure out the path to PHP manually.
  • Flags for output – In this example I've used the –q flag which runs cron in quiet mode; this flag stops some unnecessary messages. You can also add /dev/null after the server path to stop error messages being output as well.
  • Server Path to your script – You will need to specify the full server path directly to your script. You can find this on the settings page, as shown below.
  • Interspire Email Marketer attempts to write the path to PHP and any flags needed as well as the path to your cron file. If this is not displayed for you there may be something on the sever that simply prohibits Interspire Email Marketer from finding this out for you. You will therefore need to find out this path yourself.

The path to the scheduled sending script from the settings page.


Setting up cron to run the scheduling script

Now that we know what the different parts of the command line actually do, we can begin to setup a cron job for a real use. In the system, we need to run the send_emails.php file (for sending newsletters) and the send_autos.php file (for autoresponders) in the "users" folder of the application. (Please see the documentation for exact file names as this may change with later versions of the system.)
  • Decide what frequency you wish to run the script. For every hour on the hour, you would use 0 * * * *
  • Create the cronjob. Login to telnet or your control panel and type crontab -e at the command line. This will let you edit your crontab file. Type this text in:
            0 * * * * env php –q /home/user1/public_html/iem/admin/cron/cron.php
  • Sit back and let cron do the rest.

For more information on what the different parts of the cron command are please have a look at this knowledge base entry. If you would like to know how to set cron up via Cpanel or Plesk then please have a look at these knowledge base entries.

Powered by Interspire Knowledge Manager - World's #1 Best Selling FAQ and Knowledge Base Software