I am running a perl script that is grabbing a file from an ftp server and then performing a system command.
When I run the task from the scheduler, it does not grab the file but it does perform the system command. Both are wrapped in an if statement so I know that the if statement is working properly.
I have checked the permissions already and the task is using the highest permissions. I also am running the task as an administrator. Now, the catch is that when I manually run the program, everything works properly. Why does it run properly when I manually run it but not when I run it through the scheduler?
Here is some of the code:
if ($size_ftp == $size_local) {
print "Files are the same...\n";
$ftp->quit;
print "FTP has quit!\n";
} else {
print "Files are not the same...begin download!\n";
$ftp->get($file_ftp) or die "get failed ", $ftp->message;
print "Download complete...\n";
$ftp->quit;
print "FTP has quit!\n";
my $Archive_file = Archive::Extract -> new( archive => $file_dir );
print "File extraction identified...\n";
$Archive_file -> extract( to => $extract_here );
print "File extracted...\n";
system('call "C:\QMSEDX.exe"');
print "System EDX call completed!\n";
}