The usual gotcha I find is that the services do not set the environment variables of the user they run as. Often this is the PATH, but you've covered that.
However, some external executables require their own environment variables to be set to work. You happily check that a given user account has them set, you happily set the service to run as that user, you log in as that user and check it all runs OK. But it doesn't work as a service.
So...check the environment of the user for which your script works and try setting likely things in %ENV before you run the command.
If nothing looks likely, you can eliminate this as the potential issue by simply importing the entire environment. Run a 'set > env.txt' command in a command prompt as the user which this works for, and then do something along the lines of:
open( ENVFILE, "< env.txt" ) or die_screaming_in_agony();
%ENV = map( split /=/, $_, 2 } <ENVFILE>; # Untested, looks cool thoug
+h
Good luck. |