Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Perl app won't compile /run from cron

by dave_the_m (Monsignor)
on May 23, 2018 at 21:49 UTC ( #1215116=note: print w/replies, xml ) Need Help??


in reply to Perl app won't compile /run from cron

Perl usually gets extra module paths from the PERL5LIB environment variable rather than PATH. So that would be the first thing to look at.

Also, its possible that cron and the terminal are running as different users (and so with different file/directory permissions), or are using different versions of the perl executable. You can see where the module is being loaded from the terminal by using:

$ perl -le 'require Image::Grab; print $INC{"Image/Grab.pm"}' /some/path/lib/Image/Grab.pm
If that path isn't in the list of paths in the cron error message, that's another place to investigate.

Dave.

Replies are listed 'Best First'.
Re^2: Perl app won't compile /run from cron
by haukex (Chancellor) on May 23, 2018 at 21:52 UTC
    ... or are using different versions of the perl executable.

    Excellent points, and that reminds me of another piece of advice I've learned the hard way (a few times ;-) ): Always use absolute paths in crontab.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2019-06-20 21:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (91 votes). Check out past polls.

    Notices?