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
, 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.