Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Trouble finding modules from cron

by kennethk (Abbot)
on Apr 11, 2017 at 16:45 UTC ( #1187663=note: print w/replies, xml ) Need Help??


in reply to Trouble finding modules from cron

The environments are probably different between your log-in and cron. Once you've identified which path is missing from the cron environment (run perl -E'say for @INC' as yourself and as cron, check the gaps for the libraries), you can either modify the scripts using lib (e.g., use lib '/usr/local/lib64/perl5';) or modify cron's environment.

There's also a possibility here of local pathing, but the solution there is essentially the same. There's also a possibility of a permissions issue (cron doesn't have read privileges for the libraries), which requires some chmoding or group-level access modification.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Replies are listed 'Best First'.
Re^2: Trouble finding modules from cron
by cbeckley (Pilgrim) on Apr 11, 2017 at 17:51 UTC

    Ah, I had assumed (never a good idea) that the cron user and the interactive user were the same.

    Some additional questions for faineant:

    • Are the cron and interactive users the same?
    • Is Foo/Bar.pm part of the scripts you've inherited?
    • If you have access to the old system, is PERL5LIB set?
    • What is the value of @INC on the old system vs the new system?

    Thanks,
    cbeckley

      The cron user is the same as the interactive user.
      Foo/Bar.pm is part of the script tree that I have to port.
      PERL5LIB is set on the old system but I can't figure out where.
      I'm not sure if can share @INC on a public forum

      I can't believe how much help I'm getting and how quickly!

      Thank you all so much!>

      Thanks -F

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1187663]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2017-09-23 11:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (272 votes). Check out past polls.

    Notices?