Sunday, June 2, 2013

Schedule a CRON Job in HP-UX

Few days back i have a problem to schedule a cron job in HP-UX to run a .sh script.
Cron is staring exactly on the scheduled time and the particular .sh script also calling from the cron job.
But that component is not starts.

This start.sh script is as follows.

/usr/java/jre1.5.0_22/bin/java -server -Xms512m -Xmx1024m -XX:MaxPermSize=512m -Dsun.rmi.dgc.client.gcInterval=90000 -Dsun.rmi.dgc.server.gcInterval=90000 -Djavax.net.ssl.keyStore=keystore -Djavax.net.ssl.keyStorePassword=password -jar lib/DBC.jar> nohup_dbc.out &


Solution

What i did was, i created another script start-cron.cron file which as follows.

 "cd /<File path to start.sh>
  sleep 2
  ./start.sh
  "
and save as .cron.
Change the permission as 777

Then i call the start-cron.cron  file in the CRON job scheduler.
Then the component was started.

No comments:

Post a Comment