in reply to Perl script not running correct as a cron

It's most likely some kind of environment variable that isn't available when running the cron job. Processes running from cron don't run from a shell, so no profile has been set up. Considering that you don't have a username or password set for your Oracle connection, I'd make a guess some kind of authentication related environment setting is present when run from the shell, but not when run from cron.
  • Comment on Re: Perl script not running correct as a cron

Replies are listed 'Best First'.
Re^2: Perl script not running correct as a cron
by lars_4 (Initiate) on Jun 05, 2009 at 09:36 UTC
    Thanks for the reply. I was also thinking about a environment variable. The Oracle server does not require username/pass and is open. If the username/pass was not working i should not get data at all, but i do get some. Only weird values... (in the status column.. the Well is 100% ok)
      Have you determined where it goes wrong? Is Oracle returning "weird" values? Or is MySQL inserting "weird" values? What happens if you trace the DBI?
        I have run this script in cron and outputted the data to a text file. Oracle is outputting the data correctly (print $status, $well) And i did a print $_1 on the Mysql sub and that also outputs it correct. I have no idea where it is going wrong..