tags:

views:

68

answers:

2

I tried to do this in Hudson but:

I have a script in Perl on my server (windows): lets say: d\util\demo.pl I want to have it running in Hudson. so I go to Hudson, create new job, go to: Build Execute Windows batch command and add: perl.exe d\util\demo.pl

I got this error: 'perl.exe' is not recognized as an internal or external command, operable program or batch file.

please help!

+4  A: 

It can't find the perl.exe in the path of the agent that is running the task. Verify that perl is properly installed AND that the path where perl.exe was in stalled to is in you system path on EVERY agent that will run this task.

mockedobject
you can also set the path before calling the perl command. `SET PATH=%PATH%;<path to perl>`
Peter Schuetze
thanks, the problem was the different user.
ekeko
+3  A: 

Can you run that command from any folder of the server?

If yes, than the Hudson server runs definitely under a different user account. Make sure that the user account Hudson is running under has all necessary environment variables set.

If not, than add the full qualified path to the perl.exe (e.g. C:\program files\perl\bin\perl.exe d:\util\demo.pl). If this doesn't help, you have to also set all environment variables (see "if yes").

Peter Schuetze
thanks! it works now!
ekeko
since it is solved, can you accept an answer?
Peter Schuetze

related questions