[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] STARD_CRON and Windows batch script

Hey Ben:

I think the reason you are seeing the failure is that the standard input stream for the console used to run cron(dor) jobs is not a valid handle, so any child processes will inherit this invalid handle, which then cannot be opened for redirection.

My advice would be to try and generate the same information without the use of input redirection, for now.  This should also probably go down as a bug--it certainly is an unexpected result--or documented as a limitation (On Windows anyway).


On 2010-07-21, at 4:25 PM, Cathrin Weiss wrote:

> Hi Ben,
> Ben Cotton wrote:
>> I've written a batch script (http://pastebin.com/dGzhEHsC) to populate
>> ClassAds with the system manufacturer and model of Windows hosts for
>> use in hibernation calculations.  When I run the script from cmd.exe
>> it gives expected output:
>> MANUF="Dell Inc."
>> MODEL="OptiPlex 745"
>> However, when I run it from the STARTD_CRON mechanism (Windows 7 x86,
>> Condor version 7.5.3), I get the following ClassAds:
>> What's apparently happening is that the variable is not getting set
>> from the temporary file like it should be.  I looked in the logs (with
>> STARTD_DEBUG = D_FULLDEBUG) and the only relevant entry is that it is
>> executing the batch file with:
>> C:\Windows\system32\cmd.exe /Q /C "C:\condor\libexec\hardware_probe.bat"
>> Using the exact invocation as logged, I get the correct output.  This
>> happens whether I run as bcotton or as Administrator.  Any ideas?
>> Please tell me I'm missing something stupidly obvious. :-)
> what immediately caught my attention is that you are using the %TEMP% environment variable. Have you made sure that this is correctly set when the stard_cron script is executing? My best guess is that the error comes from there ...
> -- Cathrin
> -- 
> Cathrin Weiss
> Condor Project
> _______________________________________________
> Condor-users mailing list
> To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
> subject: Unsubscribe
> You can also unsubscribe by visiting
> https://lists.cs.wisc.edu/mailman/listinfo/condor-users
> The archives can be found at:
> https://lists.cs.wisc.edu/archive/condor-users/