Crontab issue with perl script

system("$sqlldr $oracleLogon control=$ctlFile log=$logFile data=$dateFile"); 

Above is the last line of my perl script. When I run script which containing this line manually (from cli) it works. But when I put it to crontab, getting fail.

Variable $sqlldr contains full path of Oracle's sqlldr script including its. Of course, all of variables containing full path including file names.

Also my script calls "system" many times and all of those are running fine expecting last this line. I'm using Ubuntu 10.04 server 64bit and I put my script into user oracle's crontab. I really can't stand what goes on there. Can anyone help me please?

Answers


Check the difference between environments in case of CLI and cron - that will be the key to understanding the issue.

Just before your system(..) call in perl put:

system("env > ~/env_in_cron.txt");

and compare this with env called in CLI.


Need Your Help

How to reduce recording noise when recording with audio sessions?

ios audio core-audio avaudiorecorder avaudiosession

I got some recording code working, but the recorded audio (from the iPod touch internal microphone) is very noisy.

Personalized Search Results for Elasticsearch

search elasticsearch personalization

How would one go about setting up Elasticsearch so that it returns personalized results?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.