Everyone,
I am building a gateway server with a new : CentOS Linux release 7.3.1611 (Core) with 3.10.0-514.2.2.el7.x86_64 kernel.
Everything was going find, but I was not able to get a particular cronjob to function properly that contained a perl script with Astro::Time as an include file. Astro::Time was installed with the use of the cpan module downloaded from the Centos repositories.
The error message I get in the logs is :
Can't locate Astro/Time.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/bin/s.bkup.degw3.prl line 12. BEGIN failed--compilation aborted at /usr/local/bin/s.bkup.degw3.prl line 12.
Line 12 is the line in the perl scrip that contains :
use Astro::Time;
The script works find from the command line, but will not work at all in a cron job.
After I reviewed the previous posts on this mail list about Centos 7 cron job problems I was motivated to change the PATH statements in the /etc/crontab file to include all of the PATH's in my root environment while using a terminal interface.
/etc/crontab file : SHELL=/bin/bash #PATH=/sbin:/bin:/usr/sbin:/usr/bin PATH=/usr/lib64/qt- .3/bin:/root/perl5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bi n:/root/bin QT_PLUGIN_PATH=/usr/lib64/kde4/plugins:/usr/lib/kde4/plugin MAILTO=root
The original /etc/crontab file was : SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root
Unfortuantely I am still not able to get this script to work.
Has anyone else had this problem and found a solution?
Greg Ennis