是否有可能在cron中使用shell sript(date.sh & backlog.sh)運行Perl腳本(vas.pl),反之亦然? 謝謝。如何從cron運行的Perl腳本中運行shell腳本?
0 19 * * * /opt/perl/bin/perl /reports/daily/scripts/vas_rpt/vasCIO.pl 2> /reports/daily/scripts/vas_rpt/vasCIO.err
遇到的錯誤:
date.sh: not found
backlog.sh: not found
Perl腳本:
#!/opt/perl/bin/perl
system("sh date.sh");
open(FH,"/reports/daily/scripts/vas_rpt/date.txt");
@date = <FH>;
close FH;
open(FH,"/reports/daily/scripts/vas_rpt/$cat1.txt");
@array = <FH>;
system("sh backlog.sh $date[0] $array[0]");
close FH;
或用戶與PATH – Schwern 2010-01-05 03:09:35
感謝:-)我忘了,包括路徑。它的工作原理!:-) – Cez 2010-01-05 03:44:06