CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: DBI:
DBD::ODBC runs manually, not via crontab



May 5, 2014, 8:01 AM

Post #1 of 2 (89156 views)
DBD::ODBC runs manually, not via crontab Can't Post

I installed DBD::ODBC and everything runs fine from a non-root account via command line, but just not via crontab. The module is located here:


I ran a crontab entry to capture the perl libraries from the account and I see the path :


Can someone help with what I'm missing, or help capturing what the error actually is? I am not even doing anything, like connecting to a DB. I just am running a bare bones perl script with the 'use DBD::ODBC' in it.

Veteran / Moderator

May 5, 2014, 11:42 PM

Post #2 of 2 (88857 views)
Re: [islanderman] DBD::ODBC runs manually, not via crontab [In reply to] Can't Post

I had a similar problem with an Oracle database: the script would run fine when launched manually from my account but would fail when launched vie the crontab. It turned out that the problem did not have to do with Perl (I reproduced it with a shell script and sqlplus commands), but with some environment variables needed to be able to connect to the Oracle database, which were not set for the root account. You might have a similar problem.


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives