我正在运行一个perl脚本,它从ftp服务器获取文件,然后执行系统命令。Perl脚本通过任务计划程序运行不同
当我从调度程序运行任务时,它不抓取文件,但它执行系统命令。两者都包含在if语句中,所以我知道if语句正常工作。
我已经检查了权限并且任务使用的权限最高。我也以管理员身份执行任务。现在,当我手动运行程序时,一切正常。为什么当我手动运行它时运行正常,但当我通过调度程序运行时运行却不正常?
下面是一些代码:
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";
}
我不知道答案,但Unix的家伙谁使用cron抱怨这[全部](http://stackoverflow.com/questions/2046570)[the](http://stackoverflow.com/questions/13204/)[时间](http://stackoverflow.com/questions/ 780072)。 – mob