Running scripts through cronjob.

Hello everybody,

I'm trying to run a shell script in crontab file. But anyhow it's not getting executed. Following is the command that I've used in crontab.

30 07 * * * . ./.cronprofile;/om/reports/reportscripts/jitu/prod/prd_pre_to_post.sh
35 11 * * * . ../.cronprofile;/om/reports/reportscripts/jitu/prod/prd_cap_nw_conn.sh

both are not getting executed. Could anybody tell me where I'm going wrong ?

What error do you get? Any new mails in the box of the user concerning cron?
And maybe better put

into the header of the scripts, just to be sure it is found.

Hi Jitu,

30 07 * * * . ./.cronprofile;/om/reports/reportscripts/jitu/prod/prd_pre_to_post.sh
35 11 * * * . ../.cronprofile;/om/reports/reportscripts/jitu/prod/prd_cap_nw_conn.sh

make sure that the prd_pre_to_post.sh shell script are uisng any ENV variable or not. if the script used any global variable you have to menstion in the script as well

one more things that the shell script (prd_pre_to_post.sh) is avalilabe or not in the spcefied directory (Path). if the script is availabe in the spcecified DIR try to execute by manually whethere its working or not?

Let me know if any concer on this again.

Regards,
MPS
Bangalore

Jitu,

You can debug using
30 07 * * * ksh -x . ./.cronprofile;/om/reports/reportscripts/jitu/prod/prd_pre_to_post.sh > /tmp/output1.txt
35 11 * * ksh -x * . ../.cronprofile;/om/reports/reportscripts/jitu/prod/prd_cap_nw_conn.sh > /tmp/output2.txt