in reply to Re^4: Turn a perl script into a Win32 Service
in thread Turn a perl script into a Win32 Service
#!/usr/bin/perl BEGIN { open(STDERR, '>', 'C:/app_name/err.log' or die $!; select STDERR; $| = 1; # un-necessary, I know print STDERR "hello world\n"; } use lib 'C:/app_name'; use strict; use warnings; use My::App; my $app = My::App->new(cfg => 'C:/app_name/app.cfg') or die "Didn't ge +t past this point\n"; print STDERR "Ok, got here\n"; while ($app->run_ok) { print STDERR "Inside while loop\n"; $app->do_things(); $app->rest_for_a_while(); } print STDERR "finishing up now\n";
When I start the service, the err.log file is created but is 0 bytes. After 5 minutes or so, I stop the service and the following output shows up in the err.log file (hello world and Ok, Got here)
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Turn a perl script into a Win32 Service
by BrowserUk (Patriarch) on Oct 14, 2008 at 17:47 UTC | |
by Limbic~Region (Chancellor) on Oct 14, 2008 at 17:54 UTC | |
by Limbic~Region (Chancellor) on Oct 16, 2008 at 00:25 UTC | |
by BrowserUk (Patriarch) on Oct 16, 2008 at 01:15 UTC | |
by Limbic~Region (Chancellor) on Oct 16, 2008 at 01:52 UTC |