CMS MADE SIMPLE FORGE

Newsletter Made Simple

 

[#8445] NMS simple jobs scheduled with CGJobMgr with NMS preference "max emails per hour" set never execute

avatar
Created By: Bill Cadwallader (bcadwallader)
Date Submitted: Wed Sep 26 11:19:11 -0400 2012

Assigned To:
Version: 2.5.6
CMSMS Version: 1.10.3
Severity: Major
Resolution: Works For Me
State: Closed
Summary:
NMS simple jobs scheduled with CGJobMgr with NMS preference "max emails per hour" set never execute
Detailed Description:
When setting the max emails per hour preference in NMS to > 0 (required for
hostgator among others) and creating/starting a job, the CGJobMgr job is started
by cron, but stays in the "In Progress" state indefinitely.  Also, the progress
in the NMS job never increments. I looked through the code for both modules but
didn't see anything that was obviously the culprit.

As a workaround, I inserted a sleep into the send_emails function of the
nms_process_jobs class in lib/nms_process_job.php. I then updated the max emails
per hour preference to 0 so that a simple, non-iterative job would be created by
the start job action in the NMS admin panel. This worked for sending out my 1700
member email list in around 4 hours. I'm not sure if it introduces a problem
elsewhere, but it worked to get my email out in a pinch.

Also, it should be noted that this behavior occurs ever with a list of a single
email address.


History

Comments
avatar
Date: 2012-10-25 12:26
Posted By: Robert Campbell (calguy1000)

I use NMS on a host with a mail limit on a bad host... as long as CGJobMgr is
properly setup it works fine.
      
avatar
Date: 2012-10-25 12:33
Posted By: Bill Cadwallader (bcadwallader)

Thanks very much for the response, and my apologies if I've wasted your time.
I'll try it again with a fresh install/config and see if it still occurs.
      
avatar
Date: 2013-01-03 10:33
Posted By: Robert Campbell (calguy1000)

NMS Requires CGJobMgr to send emails asyncrhonously.
CGJobMgr MUST be is triggered via a cron job (its in the help for that module).

This has been tested on a few sites now... works fine.

      
avatar
Date: 2013-02-05 11:28
Posted By: Dominic (huskey)

Hello, I have the same problem as Bill. If I create a new job in NMS with
message send limit set to zero, the message is sent out fine and the Admin Log
comes up as follows:

1. New job created: NMS - Job created at: 02/05/13 15:37:59 with priority 200
2. CGJobMgr - AutoJobHandler -- Executed task: setup -- task status: complete
3. CGJobMgr - AutoJobHandler -- Executed task: process emails iteratively --
task status: complete

If I repeat the job however with the message send limit set to 100 e-mails per
hour, line 1 appears in the log. In CGJobMgr, the status moves from "Not
Started" to "In Progress" when the cron job runs (every 10 minutes, in my case)
but but lines 2 and 3 in the log never follow and the job never runs.

The only other thing to mention is loading process.html makes line 2 appear in
the log but the status of the job remains unchanged and the messages are not
sent.

Any ideas as to why this would be the case would be greatly appreciated.

Many thanks
      
Updates

Updated: 2013-01-03 10:33
state: Open => Closed

Updated: 2012-10-25 12:26
resolution_id: => 11