Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
I want to communicate from one server, to many clients and invoke a set of scripts. I've made this possible ( actually with the help of you monks!! ), using perl threads.
In the current scenario, I would have to run the script in each of the client machines (all running under Windows) thru a command prompt and then use the server script to communicate.

I was wondering if you could make the perl script run as a service in each of these machines, by converting them to an exe. So I used perl2exe registered pro version and tried to install a service (using instsrv.exe - a Windows service pack utility ). Guess what? It does not work! The service stops half way thru when I start it up.
Is there any alternative to make the script as a service or otherwise for it to run indefenitely?
Thanks in advance!

Replies are listed 'Best First'.
Re: threads as service?
by ant9000 (Monk) on Oct 21, 2003 at 06:52 UTC
    Well, I'd prefer to fix things instead of finding another solution :)
    So, first question: does the exe file you produced work, if not istantiated as a service?
    If it does, then you should try to track down differences between the environment of services and the one you use: things like libraries/binaries paths, for instance, as well as needed permissions. Try hard to produce error logs, they are your only help.
    BTW, is it not possible to start perl as a service, and pass the script as a command line argument? I thought you could do just this, without compiling at all. If you can, then investigating failure causes should be easier.
    HTH,
    Ant9000
      Off-topic, I know, but I feel I must say it...
      I really don't mind being down-voted, I'd just like to know why. After all, this place is devoted to knowledge, so if you know better than me, please spend a minute to shed your light on a poor monk!
      Thanks,
      Ant9000
      UPDATE
      Did anybody take offence? Even this post got --ed without giving me any reason...
Re: threads as service?
by astroboy (Chaplain) on Oct 21, 2003 at 11:59 UTC