Trying to trigger a .cmd to run on the MIDServer with no success....

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2011 11:22 AM
I am trying to use the ECC queue to trigger a .cmd to run on my MIDServer with no success. I am using the wiki article "http://wiki.service-now.com/index.php?title=Borland_Starteam_Integration" as a guide. I can manually go to the server and run the .cmd, and it works perfectly, but I can't insert an ECC Queue entry successfully like shown in the UI Action of this article. I realize that the article is running a .js file and I'm trying to run a .cmd, but I would think it should still work. I removed "cscript" from the entry since I am not running .js, but still no success. Below is my ECC Queue Code:
//command to run
var cmd = 'c:\\scripts\\psprinter2xcopy.cmd ';
//create a new ecc_queue record
var queue = new GlideRecord('ecc_queue');
queue.initialize();
//where to process
queue.agent = 'mid.server.' + midServer;
queue.topic = 'Command';
//script to execute
queue.name = cmd;
queue.source = 'UI Action';
queue.queue = 'output';
queue.state = 'ready';
queue.insert();
}
Thanks for any help...
Jason

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2012 07:58 AM
Is the ECC Queue processing this record? Is the MID server grabbing it as work to do? Is there anything in the agent0.log file that suggests a failure?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2012 10:40 AM
I do get an entry into the queue, and it states that is has been processed. I get an output and an input record with no errors that I see, so it appears to be processing the record. I 'm not sure how to diagnose the last two questions (part of my problem...). I don't see anything in the log that jumps out at me as failure, but I also don't know what I should be looking for.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2012 01:30 PM
What does the INPUT XML contain?
On or around the time that the ECC queue marked the output as processed, is when the MID server is going to start its work. The agent0.log would have entries around that time (+/- a few seconds likely). Errors/failure could be there.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2012 03:20 PM
XML of the input:
<?xml version="1.0" encoding="utf-8"?>
476bd21784db90400d1e060476e97b7b
Showed processed at 01-06-2012 18:16:48. The only log entry I see at this time is:
01/06/12 18:16:48 (027) MIDServer stats threads: 91, memory max: 508.0mb, allocated: 142.0mb, used: 111.0mb, queued: 55 probes, processing: 26 probes
01/06/12 18:17:03 (964) StatusMonitor.600 Enqueuing: work\monitors\ECCSender\output\ecc_queue.b54fa95cac1fe8a2004bcedfa64789d0.xml
01/06/12 18:17:04 (511) ECCSender.1 Sending ecc_queue.b54fa95cac1fe8a2004bcedfa64789d0.xml
I included the 2 entries right after also....
Thanks for the help by the way....
Jason.