I agree wth Jorge, it looks like your PATH is incomplete. Are you sure it's in the system "Path" variable? You can check the system info page on the slave in question to see if Jenkins slave process is correctly inheriting it. Maybe you changed the env variable after you launched the slave --- the environment variable changes won't affect processes that are already running.
I'm also curious why you are not running perl command directly. Your "cd" is pointless because it's already on $WORKSPACE. You could have just done sh "perl engine/deploy.pl" 2014-11-26 4:23 GMT-08:00 Rupali <rupalite...@gmail.com>: > I am trying to run a shell script on Windows Server. > Usually we set start line in shell script as "#!d:\cygwin\bin\bash.exe -l" > to point to bash under cygwin. > This is not working in work-flow step. > *I have written shell script execution step as below:* > sh '''#!d:\\cygwin\\bin\\bash.exe -l > > cd $WORKSPACE > perl engine/deploy.pl > exit $?''' > > *I get below error:* > > java.io.IOException: Cannot run program "nohup" > > CreateProcess error=2, The system cannot find the file specified > > I have written shell script execution step as below: > > Can you advise on how do I setup path to cygwin here so that it can find > the required shell script commands? > Note: cygwin is already included in system path variable. > > Regards, > Rupali > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/e613e539-156f-40cf-9288-b97b74cb9b42%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/e613e539-156f-40cf-9288-b97b74cb9b42%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Kohsuke Kawaguchi -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAN4CQ4yxjMzuR0BGGWwYWxM99VDV8GwP%2BdMVp1fBFd5ZoOo-Gw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.