-1
我最近將我的網站移動到了新的服務器上,它似乎在運行我的Perl cron作業時遇到了問題。通過命令行運行cron時發生Perl錯誤?
[email protected] [/]# perl /home/username/backend/cron/daily_first.pl
Can't locate Proc/PID/File.pm in @INC (@INC contains: /home/username/backend/cron/../lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /home/username/backend/cron/cronjob.pl line 8.
BEGIN失敗 - 編譯在/home/username/backend/cron/cronjob.pl線8
這裏中止是第9行代碼的文件副本,我跑:
#!/usr/bin/perl
use strict;
use warnings;
use FindBin qw/$Bin/;
use lib "$Bin/../lib";
use Proc::PID::File;
exit if Proc::PID::File->running({ dir => $Bin });
萬一有幫助,我的所有的Perl cron作業似乎給人這樣的錯誤...