Newsletter plugin Background Tasks

By esupport - August 19, 2015

Hi,

On the cmsAdmin Background Tasks settings : add a server cronjob or 'scheduled task' to execute the following command every minute:

php -q /home/quanmax/public_html/cmsAdmin/cron.php

I added this on our hosting cpanel cron job settings.

It seems not working.

How to make it works correctly?

Our hosting run cron job at least 30min per time.

Is it ok for newsletter background task settings?

Thanks!

-Jax H.

-Jax H.

By Dave - August 26, 2015

Hi Jax, 

You can see the last run time here: admin.php?menu=admin&action=general#background-tasks

It will still work if the cron only runs every 30 minutes, it will just take a lot longer to send out mail outs.  Really you need your host to run the cron once a minute, or to use a host that supports that.  Most do.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com

By esupport - August 26, 2015

Hi Dave

Thank you for your reply.

The last newsletter sending in 2 days ago.  It seems not working.

Screenshot:

https://nimbus.everhelper.me/client/notes/share/273569/q1XB9khhk5N5BHTC20fxZrdzDfqTy5T1/

I have to click "run now >>" to finish the newsletter sending work.

----------------------------------------------------------------

Our hosting company is Hostgator.

They provide cron job feature.   I asked them the newsletter issue.

Our hosting company (Hostgator) said that is not their issues.  They want me ask the script company for solving the problem.

----------------------------------------------------------------

Is there any way for testing?

-Jax H.

By Dave - August 27, 2015

Hi Jax, 

Yea, just ask the host how to run the script located here (/home/quanmax/public_html/cmsAdmin/cron.php) every minute.

Let them know what you tried and that it's not working.  They may have a different way to call it or special instructions.

Once it is working, that "last run" value will be updated once a minute.

Let me know how it goes.

Dave Edis - Senior Developer
interactivetools.com

By esupport - August 27, 2015

Hi Dave

HostGator limits cron jobs on Shared servers to run in 15 minute intervals, since excessive cron jobs can cause high loads on the server.

As I know.  Most hosting Shared server plan limit the Intervals.  Not in every minute.

is it the problem for the issue?

There is a clue.

our customer use their own mail server.

only web/database using hostgator Server.

Do you think It might be the problem?

Thanks!!

-Jax H.

By Dave - August 28, 2015

Hi Jax, 

The reason we want cron.php called every minute is because it's a cron "dispatcher".  It dispatches jobs as needed and only "if needed".  It saves us the work of setting up many many cron jobs every time we need one.

Most hosts we've seen (and we see a lot of hosts) allow cron jobs to run once a minute.  If you're doesn't, I'd make a special request that they allow it for a cron "dispatcher" script or consider moving to another host (or ask if they have plans that allow once a minute crons).

If you have to run with a cron only every 15 minutes, that's not recommended, but I'd increase this number by x15, eg: 7500:

// max messages to send in each batch, eg: If a cronjob runs the script every minute
// ... and this is set to 60, you'll send approx 1800 emails an hour
$GLOBALS['BACKGROUND_SEND_MAX'] = 500; 

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com

Newsletter plugin Background Tasks - solved.

By Dave - September 2, 2015

Hi Jax, 

Glad to hear it's working now, thanks for letting us know!

All the best, 

Dave Edis - Senior Developer
interactivetools.com