How to configure the server to run your message queue

From HAA Best Practices Wiki
Jump to: navigation, search

Your server was configured to run the PHPList message queue once a day when your system was set up. If you have a large number of users (over 300) you might want to run the queue more frequently. You do that by following the instructions on this page.

You configure your server to run the PHPList message queue by setting up (or editing) a "Cron job" on the server. To do this you need to sign in to CPanel on your server. (Your were given instructions on how to do this when your system was first set up. If you would like assistance check with Bill Bean.)

Once on CPanel, go to "Cron jobs" on the "Advanced" panel at the bottom of the page. You are given a choice between "Standard" and "Advanced". I recommend standard for most purposes. On the Cron Manager page, you will first see an email address where the notifications that the job has run are sent. Then you will see an entry with a "Command to run" field that looks like this:

/usr/local/bin/php -q /home/YourSitegroundUserIDHere/public_html/lists/admin/index.php -p processqueue;

You want to change the times associated with that command - but not the command itself.

If you want to suppress the email notification when the queue is run, redirect the command by adding the following to the end:

>/dev/null 2>&1

To set the queue to run once an hour, for example, chose "every hour" in the hours box, "every day" in the days box, "every month" in the months box and "every week day" in the weekdays box. Set the minutes box to the minute of the hour when you would like the job to run. (I tend to set the minute to an odd value on the assumption that other people may be lazy enough to run on the hour and we'll get more processing time if we don't do that.) Be careful not to use any of the "Every minute, Every Other Minute..." settings. All of them violate the terms of service on the server.

When you have made your changes, click the "Save Crontab" button.

Return to Bulk Email How-to's