Help with Cron job
Posted by: alderyarrow
Posted on: 2006-05-21 12:23:00
Howdy.
I'm trying to set up a Cron job to run a perl script in order to enable scheduled posting on a Movable Type implementation.
My cron job looks like this:
0,15,30,45 * * * * /usr/local/bin/perl /<pathtomydirector>/tools/run-periodic-tasks
Where "run-periodic-tasks" is an executable perlscript
If I'm on the shell and sitting in the tools directory and I type the command that is in the cron job above, the script executes fine.
However with the cron job set up as it is, I get the following error:
Can't locate MT/Bootstrap.pm in @INC (@INC contains: lib ../lib /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /<mydomainpath>//tools/run-periodic-tasks line 11.
BEGIN failed--compilation aborted at /<mydomainpath>/tools/run-periodic-tasks line 11.
Does this happen because cron is running on the system as some other sort of user as opposed to me? why would I be able to execute the script without a problem but cron can't?
Thanks for your thoughts.