If you log in using the user that is specified in the task, and run it, what happens?
If you set the task up to run as you, and start it while you are not logged in, what happens? Scheduled Tasks have no issues with perl.exe.. I have 6 - 10 perl tasks running on various systems, but none on "XP Home Edition"... :( Steven -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alexander Apprich Sent: Sunday, July 11, 2004 10:25 PM To: colin_e Cc: [EMAIL PROTECTED] Subject: Re: Task Scheduler script will only run when i'm logged in? Colin, colin_e wrote: > Platform: Athlon 64, 1GB RAM > OS: Win Xp Home > Perl: ActivePerl 5.8.3 > > > Guys, I would have thought this was a common issue but I can't find it > in the archives. > > To help track a network problem I wrote a small perl routine around > ping. The idea is to run this every > hour and log some ping stats to a text file. I have a couple of problems > with this that I think may be related- > > 1) When run successfully from the scheduler a blank console window pops > up, even though I don't use > STDIN/STDOUT. I presume this is because perl.exe is defined as a > command-line tool, but I'm not > aware of a way of running detached "daemon" scripts under XP to avoid > opening a window. > > 2) The script doesn't run at all if I am not logged in, which rather > defeats the object! > > If there is no logged-in user, or it is another user (i.e. not me), > the task scheduler > obvously tries to run the script, but it fails with exit code 0x80. I > can't find a reference for these codes, > but i'm guessing it means that a task running under my name can't > open a screen window unless I am > logged in. Sadly one of the many ways XP Home is crippled is that the > scheduler seems to have some > diagnostic options missing by comparison with the XP Pro version. > > Can someone point me to any of- > > a) Hints on writing background (window-less) scripts under Win NT/XP. > > c) A reference for XP Task exit codes. > > Any tips/pointers/ideas gratefully received. > > Regards: Colin Try switching to wperl.exe. wperl is in the same directoy as perl.exe, but it doesn't create a dos-box for output like perl.exe does. Should fix most of your problems. Hope this helps. Alex _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
