I have a script I am working on that is using the MT API to create entries in an existing blog.

When I run the script from the shell I have no problems, it works fine and creates new entries without errors. I need the script to work from crontab which is called every 10 minutes, but when the script is invoked via crontab I get this error:

CODE
Base class package "Class::Accessor::Fast" is empty.
    (Perhaps you need to 'use' the module which defines that package first.) at /home/sites/schmeldritch/cgi-bin/mt/lib/MT/Component.pm line 10
BEGIN failed--compilation aborted at /home/sites/schmeldritch/cgi-bin/mt/lib/MT/Component.pm line 10.
Compilation failed in require at (eval 3) line 3.
    ...propagated at /usr/lib/perl5/5.8.0/base.pm line 64.
BEGIN failed--compilation aborted at /home/sites/schmeldritch/cgi-bin/mt/lib/MT/Core.pm line 5.
Compilation failed in require at /home/sites/schmeldritch/cgi-bin/mt/lib/MT.pm line 947.


I even tried running the crontab from the root account using su username -c '..' to run as the same user with shell, which should simulate being logged into the shell, but even then the same error appears.

I am unsure of how to proceed, can anyone offer any suggestions for what I might try next?

Thanks,
Andy