in reply to running .profile
I would not recommend running the whole .profile file for the cron instance. Most times there is more in your profile than the few Oracle environment variables you need. I normally get this to work using a shell script wrapper around my perl script.
So your cron would call the shell script
0 12 * * * /path/to/script.sh
Then your shell script would set the variables and run the script
#!/bin/sh ORACLE_HOME=/path/to/oracle ORACLE_SID=testdb perl /path/to/script.pl
|
|---|