scheduled task error

Microsoft Windows server 2003 enterprise...
December 10, 2009 at 12:06:47
Specs: 2003 server x64
I have a perl script that calls in a bat file via the system() command.

I have set this perl script to run on windows scheduled tasks in a manner that I can capture stderr and stdout to a log file such as:
CMD \C C:\path\to\ >> C:\path\to\log.txt 2>&1

the problem i'm seeing is that when I do it this way, my system() call to execute my batch file fails.

It works perfectly if I run the perl script from the command line, and it also works perfectly if I omit the extra code to capture the stderr and std out in scheduled tasks such as:


I can't for the life of me figure out why it won't work when I try to capture stderr and stdout.

If i comment out the system() call to the batch file it works with the capture of stderr and std out, so it's definately the batch file that is having trouble using this method.

any ideas what I can do to fix this?

See More: scheduled task error

Report •

December 10, 2009 at 21:39:01
cklock7880, sorta dumb question, but did you establish a second account and THEN establish the scheduled event? A user account is needed.
Ed in Texas.

Report •

December 11, 2009 at 07:36:59
it's running as administrator, and as I stated it works fine if I don't try to capture the STDERR and STDOUT.

Report •

Related Solutions

Ask Question