Process NMS-job immediatly

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
Freud
Forum Members
Forum Members
Posts: 53
Joined: Fri Jun 12, 2009 6:45 pm
Location: Schipluiden

Process NMS-job immediatly

Post 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?
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: Process NMS-job immediatly

Post 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.
User avatar
Freud
Forum Members
Forum Members
Posts: 53
Joined: Fri Jun 12, 2009 6:45 pm
Location: Schipluiden

Re: Process NMS-job immediatly

Post 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.
Post Reply

Return to “Modules/Add-Ons”