Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

perl in the cron 1

Status
Not open for further replies.

ejaggers

Programmer
Feb 26, 2005
148
US
How do you get perl apps to run in the cron on unix. It can't find UtilityLibrary:

#!/usr/bin/perl
use UtilityLibrary;
$ENV{PERL5LIB} = '/usr/users/ejaggers/Perl/Lib';
my $ofh = '/usr/users/ejaggers/tt.out';
open(OFH,">>$ofh");
my $date = Julian('02/11/2009');
print OFH "$date ecj\n";
close OFH;

Can't locate UtilityLibrary.pm in @INC (@INC contains: /usr/lib/perl-5.8.0/lib/5
.8.0/alpha-dec_osf /usr/lib/perl-5.8.0/lib/5.8.0 /usr/lib/perl-5.8.0/lib/site_pe
rl/5.8.0/alpha-dec_osf /usr/lib/perl-5.8.0/lib/site_perl/5.8.0 /usr/lib/perl-5.8
.0/lib/site_perl .) at /usr/users/ejaggers/tt.pl line 4.
BEGIN failed--compilation aborted at /usr/users/ejaggers/tt.pl line 4.
 
I am assuming UtilityLibrary is in /usr/users/ejaggers/Perl/Lib.

You can do this

Code:
#!/usr/bin/perl
  
  use lib '/usr/users/ejaggers/Perl/Lib';
  use UtilityLibrary;
  ...
use
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top