Operating System - HP-UX
1834621 Members
2576 Online
110069 Solutions
New Discussion

Re: Cronjob not running even in log showed the activities

 
SOLVED
Go to solution
Pratyush Paul_1
Valued Contributor

Re: Cronjob not running even in log showed the activities

Hi - you do not have the shell in the script, in the very 1st line of the shell script hence cron is not going to work, cron does not have a shell to launch this script hence it is not working

add the following

#!/bin/ksh

and try this.

regards

Pratyush
Die Hard
AMIR-APM
Advisor

Re: Cronjob not running even in log showed the activities

It was a great experienced and really appreciate for the helpers.
Dennis Handly
Acclaimed Contributor

Re: Cronjob not running even in log showed the activities

>Pratyush: you do not have the shell in the script, in the very first line of the shell script hence cron is not going to work

This is always a good idea. But cron tells you that it is going to use /usr/bin/sh to execute each script.
OldSchool
Honored Contributor

Re: Cronjob not running even in log showed the activities

You said: "I can see in my profile is seem like the java path is not configured

export PATH=$PATH:$ORACLE_HOME/bin:$PATH_DEF:/usr/bin/X11
and i added :/opt/java1.5/bin in the last line and everything back to normal"

unless the script is run specifically using your profile, this has absolutely nothing to do with the problem you experienced. cron will run the job as the user that "owns" the crontab and it will ignore the environment of that user. the script itself is pretty much responsible for setting up the required environment.