Re: Trying to start a perl script as Windows Service




Quoth "dn.perl@xxxxxxxxx" <dn.perl@xxxxxxxxx>:
On Sep 28, 11:46 am, Bill H <b...@xxxxxxxxx> wrote:
On Sep 28, 12:45 pm, "dn.p...@xxxxxxxxx" <dn.p...@xxxxxxxxx> wrote:

I want to run a perl script which will continue running on Windows XP
even after I log off, the way nohup works in Unix. A recommended way
of doing it is to run the application as Windows Service. Accordingly
I wrote a test script (myscript.pl), which prints a line every 10
seconds in an infinite loop :
Time is 2007-09-27 16:22:25
Time is 2007-09-27 16:22:35
Time is 2007-09-27 16:22:45

I created a service for the perl script. When I start the service, it
stops immediately.
The message is : The print_tstamp service on local computer started
and then stopped. Some services stop automatically if they have no
work to do, for example, the Performance Logs and Alerts service.

Just a guess - but did it stop because you closed the window, which
means it had no place to print (maybe gets an error?)

Well, I am printing (concatenating) the string to a file.
I tried to run the service with perl, and also with wperl.
But so far nothing has worked. When I log off, the process
terminates.

To run an arbitrary program as a windows service you need to use srvany
from the Resource Kit. I don't really know why, but it's to do with how
Windows expects a service to behave. See
http://support.microsoft.com/kb/137890 .

Ben

.



Relevant Pages

  • RE: Using a receive file adapter with a NFTS shares on UNIX
    ... from the BizTalk Server. ... Make sure Windows Service for Unix is started. ... Make sure you can access the UNIX NFS file shares from My Network ... here than the BizTalk file adapter won't be able to see them either. ...
    (microsoft.public.biztalk.general)
  • Re: Trying to start a perl script as Windows Service
    ... the way nohup works in Unix. ... of doing it is to run the application as Windows Service. ... work to do, for example, the Performance Logs and Alerts service. ...
    (comp.lang.perl.misc)
  • Re: Trying to start a perl script as Windows Service
    ... the way nohup works in Unix. ... of doing it is to run the application as Windows Service. ... I wrote a test script, which prints a line every 10 ...
    (comp.lang.perl.misc)
  • Invoke C/C++ on unix using .Net application
    ... I need to invoke C/C++ code (which is running on Unix Machine) from .Net ... As far as I know using SFU(Windows service For Unix), ... windows m/c and not on Unix m/c. ...
    (microsoft.public.dotnet.framework.interop)
  • [SLE] NFS client for Windows
    ... I've found the "Windows service for Unix 3.5", installed it, but can't ... understand where is a fstab? ... Please read the FAQs: suse-linux-e-faq@suse.com ...
    (SuSE)