Page 1 of 1

Process NMS-job immediatly

Posted: Sun Sep 09, 2012 1:35 pm
by Freud
I've installed NMS 2.5.6 and CGJobMgr 1.2.7 and setup a cronjob every hour, just like Callguys example:

Code: Select all

0 * * * * wget -O /dev/null http://mysite.com/CGJobMgr/process >/dev/null 2>&1 
Everythings works great, scheduled jobs were processed fine by the cronjob.
But sometimes, for testing a newsletter, I want to process the job immediately. So I made a simple UDT to process the scheduled job:

Code: Select all

$cmd = "wget -O /dev/null http://www.mysite.com/CGJobMgr/process >/dev/null 2>&1";
exec($cmd);
This works fine when I execute this UDT in the admin-section, job is processed and nemwletter(s) were sent, but when I add this UDT to the JobCreated-event of CGJobMgr, both CGJobMgr and NMS give an error:
CGJobMGR: ERROR: setup failed
NMS: nms job has invalid status
I've tried cURL and file_get_contents() for the job-execution, but the same results.

I can't figure out why this doesn't work.
Can anyone help me on this?

Re: Process NMS-job immediatly

Posted: Sun Sep 09, 2012 5:07 pm
by staartmees
under Calguys Job Processing Manager, select tab Settings and click on the Job Processing URL - This is the URL that when triggered will begin processing of queued jobs.

Re: Process NMS-job immediatly

Posted: Sun Sep 09, 2012 5:34 pm
by Freud
Hello staartmees,

I am aware of that option, but I want to hide CGJobMgr in the admin for my cliƫnt. He must be able to test newsletters aswell, so that's why I want to connect the execution of jobprocessing to the 'start-job-button' in NMS-jobs-tab. A much more elgant solution then clicking the link in the CGJobMgr-settings-tab.