我有一个perl.exe文件,我每十分钟运行一次。我设置了Windows调度程序来运行它,它表示它是成功的,但文件中没有输出。当我单击.exe时,它会将信息写入输出文件。当调度程序假定已经运行它时,文件中没有任何内容。有没有我可以写入perl脚本的代码,让它每10分钟运行一次?或者是否有人知道它可能无法正确执行的原因。这里是我的脚本代码:安排perl脚本
#!/usr/bin/perl -w
use LWP::Simple;
$now_string = localtime;
my $html = get("http://www.spc.noaa.gov/climo/reports/last3hours.html")
or die "Could not fetch NWS page.";
$html =~ m{(Hail Reports.*)Wind Reports}s || die;
my $hail = $1;
open OUTPUT, ">>output.txt";
print OUTPUT ("\n\t$now_string\n$hail\n");
close OUTPUT;
print "$hail\n";
我们可以看到您在窗口调度程序中使用的命令吗? – spinon 2010-07-02 21:07:00
我没有使用命令我刚刚选择文件下的文件选择选项 – shinjuo 2010-07-02 21:25:59
'use strict;使用警告;' – Ether 2010-07-02 21:57:27