Page 1 of 1

3.05 Hostgator cron working setup

PostPosted: 9:30am, Mon 14 Oct, 2013
by luffe
Hi all
I got this working af several hours of researching on this forum, so I thought I would post the setup I got working on Hostgator shared hosting with cron job.

Hostgator has a max 500 emails per hour so I set it to 480.

Here goes:
In config i have.
Code: Select all

$commandline_users 
= array("yourhostgatorusername");
define ("MANUALLY_PROCESS_QUEUE",0);
define('MAX_PROCESS_MESSAGE',1);
define("MAILQUEUE_BATCH_SIZE",120);
define("MAILQUEUE_BATCH_PERIOD",900);
define('MAILQUEUE_THROTTLE',8);
 

This will take a batch of 120 emails and send 1 every 8 seconds for 15 min(900secs) = 480 per hour.

The cron setup.

Set it to run every 15 min.
Command line:
Code: Select all
/usr/local/bin/php -/home/hostgatorusername/public_html/www.yourdomain.com/lists/admin/index.php -p processqueue -/home/hostgatorusername/public_html/www.yourdomain.com/lists/config/config.php

Hope this will help , thought it would be a nice first post for me, here on phplist forum.

Regards
Luffe

Re: 3.05 Hostgator cron working setup

PostPosted: 9:56pm, Mon 14 Oct, 2013
by xavierprotto
I was using a phplist versión 2 with this cron job at my gatorhost cpanel:

curl 'http://www.tulukanews.com.ar/lists/admin/index.php?page=processqueue&login=XXXXXX&password=XXXXXX' &> /dev/null ;

Now i made a clean instalation of PHPLIST versión 3.05 and that cron job doesn´t work anymore....

Would you help me with this? wich changes i must do to fix it? thank you.

Re: 3.05 Hostgator cron working setup

PostPosted: 2:49pm, Wed 13 Nov, 2013
by charlz71
I have a similar setup with Luffe in the Phplist. But now the new version has 2 config files - config and config_extended.php. I have set the cron job similar to Luffe but the throttling doesnt seem to work. Looks like the throttling settings in the config_extended.php is not being loaded or read when the cron job runs. (BTW, the old cron job command i have for ver 2 does not work with ver 3.)

To make it work, I copied the throttling configuration to the config.php, commented the ones in the config_extended and it worked. Question: Is it ok to copy or move some settings from the config_extended to the config.php, just like in the old version?

Re: 3.05 Hostgator cron working setup

PostPosted: 3:17pm, Wed 13 Nov, 2013
by Dragonrider
charlz71 wrote:I have a similar setup with Luffe in the Phplist. But now the new version has 2 config files - config and config_extended.php. I have set the cron job similar to Luffe but the throttling doesnt seem to work. Looks like the throttling settings in the config_extended.php is not being loaded or read when the cron job runs. (BTW, the old cron job command i have for ver 2 does not work with ver 3.)

To make it work, I copied the throttling configuration to the config.php, commented the ones in the config_extended and it worked. Question: Is it ok to copy or move some settings from the config_extended to the config.php, just like in the old version?

Yes, but if you want to use the settings as in the config_extended file, rename it to config.php, replacing the quick start version of config.php.

Oh, and no, the cron job command has changed between version 2 and version 3,
There is a plug-in for phpList cron jobs which may help, and somewhere on the forums, there is a post or two giving details on what cron command to use, but I can't seem to find it at the moment.

Re: 3.05 Hostgator cron working setup

PostPosted: 3:49pm, Wed 13 Nov, 2013
by charlz71
Thanks a lot Dragonrider. I thought both of the config files are necessary and they are needed both to make phplist work. I never thought i could use only the config_extended and rename it as config.php.

And yes I have configured a cron job command correctly after a few trials and errors. It's just this throtlling setting that makes my life complicated but found out how it could work finally.

Re: 3.05 Hostgator cron working setup

PostPosted: 6:34pm, Wed 13 Nov, 2013
by Dragonrider
charlz71 wrote:Thanks a lot Dragonrider. I thought both of the config files are necessary and they are needed both to make phplist work. I never thought i could use only the config_extended and rename it as config.php.


It's not been mentioned very clearly I must admit, though there is a couple of lines near the top of the config files that basically the smaller file is a quick start setup and the extended one is the full setup and it's not that obvious that that one should be renamed to config.php if used.