Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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 (Curate) 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/ 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?


      The cron user is the same as the interactive user.
      Foo/ 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?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1187663]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2021-10-19 22:39 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (77 votes). Check out past polls.