Sean LeBlanc <> wrote: > I'm trying to nail down why my script seems to just quietly fail when > running. It seems that trying to import variables is failing: > > This is test.pl: > > #!/bin/perl > use Env; > print "foo!\n"; > print "CVSROOT=$CVSROOT\n"; > > This works fine from the command prompt. > > Scheduled it this way: > at 8:03 cmd /c "c:\perl\bin\perl.exe c:\home\test.pl > c:\output.txt" > > When it runs, nothing is in output.txt. Comment out use Env and it > works, but has nothing for CVSROOT, of course. > > I've also found that other imports seem to have it quietly fail, too. > For example, use Date::Manip qw(ParseDate UnixDate);
I think the initial problem is that you are not capturing error messages, which are usually sent to stderr, you are only capturing stdout with your "> c:\output.txt". If you make that "2>&1 > c:\output.txt", you should capture both stdout and stderr in your file, which should at least allow you to see the error messages. Having said that, the problem is probably related to scheduled tasks being run as a different user, certainly with a different environment. To see, capture the output from the "set" command and compare it with the output when running from the command line. HTH -- Brian Raven ================================= Atos Euronext Market Solutions Disclaimer ================================= The information contained in this e-mail is confidential and solely for the intended addressee(s). Unauthorised reproduction, disclosure, modification, and/or distribution of this email may be unlawful. If you have received this email in error, please notify the sender immediately and delete it from your system. The views expressed in this message do not necessarily reflect those of Atos Euronext Market Solutions. L'information contenue dans cet e-mail est confidentielle et uniquement destinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee. Toute copie, publication ou diffusion de cet email est interdite. Si cet e-mail vous parvient par erreur, nous vous prions de bien vouloir prevenir l'expediteur immediatement et d'effacer le e-mail et annexes jointes de votre systeme. Le contenu de ce message electronique ne represente pas necessairement la position ou le point de vue d'Atos Euronext Market Solutions. _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
