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?
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.