You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Sometimes it is neccessary to get the PID of the actual running task (job). The programm getParentId is made for this. You can download the program here: www.sos-berlin.com/download/getParentId.zip

Please unzip to any location. You will find the exe file getParentId.exe. Executing this exe results in the PID to STDOUT. Here is an example job that set an environment variable PID with the pid.

This program is presently working on 32 bit systems only.

 <job  name="job7">
     <script  language="shell">
        <![CDATA[
 c:\temp\getParentId > 1.pid
 set /p PID=<1.pid
 del 1.pid
 echo pid= %PID%
         ]]>
     </script>
 
     <run_time />
 </job>
  • No labels