Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
DNR response code issue
Kilroy
I've wired up a DNR to test that it halts on an error. I'm using the demo workflow, and put this in demo_aggregation_tier1:
DNR section defined as:
- <dnrDeploymentJob location="source" when="before" state="always">
<script cmd="okpubtime" as="" where="c:\tmp" async="no" />
</dnrDeploymentJob>
okpubtime.exe defined as:
static void Main(string[] args)
{
Console.WriteLine ("<response code=\"-2\"/>");
}
What am I missing to make this work (i.e. stop on a dime in this case...?)
kilroy
Find more posts tagged with
Comments
Adam Stoller
cmd="okpubtime" should be cmd="C:/path/to/okpubtime.exe" (i.e. the full path, including drive letter, to the command which is to be run).
Do not assume the PATH element in the DNR context is the same as the PATH element at a Command Prompt.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Kilroy
should I still need that if the EXE is on the environment PATH?
(also found out it needed the .exe extension explicitly added to the command syntax.)
thx,
Kilroy
Adam Stoller
It's generally a wise idea *not* to *assume* the PATH you see when looking at your environment is the same as that which exists when a program invokes a shell process to run a command for you.
If you invoke a script in the same manner and have it print out the PATH and your program exists on that PATH - then yes, you can leave out the path - but otherwise it's better to explicitly reference it (it also allows someone else looking at your code to know where to look for the program its running)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com