#!/bin/ksh

Hi,

I wrote scripting to perform some jobs. (eg, run_job)
Everything works ok when i tested it on my side.
I execute the run_job manually and it works perfectly ok.

When my administrator try to run it using a scheduler job.
He encountered problem of running it.
He said it might be due to we are using ksh.

Hence, i added #!/bin/ksh in front of my code.
But seems like my program will stop running at there once i hit that #!/bin/ksh code.
Anyone know why?

Thanks!

Generally speaking when a script will run from the command line, but not from cron, it is an environment problem, often PATH. If your script is using environment variables, hard code them in the script and export them.

There is nothing wrong with ksh.

The easiest way to find the problem is to look at the output from the job. Normally this is mailed to the user than the job is running as, but you can also put this at the end of the crontab entry to log everything:
>/tmp/mycron.log 2>&1

If you are still having problems post the output and someone should be able to help.