The test to know if it's a cron run won't work when cron is launched by poormanscron.

if ($_GET['q'] != 'admin/reports/status/run-cron' && (request_uri() != '/cron.php')) {

Maybe something like this would work ?

if (!variable_get('cron_semaphore', false)) {

But if new mails are sent during cron run, they will be mailed directly instead of being queued. Not so good with sites whose cron run's duration is long.

Comments

cor3huis’s picture

Also not compatible with other cron solutions like Super Cron. I would advise trying theQueue Mail Module and see if it fits your goal

el.charter’s picture

Maybe a pregmatch with the keyword 'cron' would be a good compromise.

polskikrol’s picture

Subscribe

polskikrol’s picture

Can confirm the same issue with poormanscron.... only works when run directly via admin/reports/status/run-cron.

zyxware’s picture

Assigned: Unassigned » zyxware

Ok this issue should be resolved in the latest 6.x-2.x branch as $_GET is no longer used to detect cron runs. If you can try out the new release it would be great - http://drupal.org/node/1333638. You will have to uninstall the existing module and install the new version as there is no upgrade path as it is. It has quite a few bug fixes as well.

anish_zyxware’s picture

Issue summary: View changes
Status: Active » Closed (fixed)