Operating System - HP-UX
1752767 Members
5259 Online
108789 Solutions
New Discussion юеВ

Re: Program can not be run in the cron environment

 
SOLVED
Go to solution
Dennis Handly
Acclaimed Contributor

Re: Program can not be run in the cron environment

>JRF: I only use POSIX or Korn shells so the syntax of the included material should be compatible in either case ;-)

That's not relevant. If you source something, you use your current shell. The #! is just a comment. You also can make the file non-executable so it is never executed as a script.
James R. Ferguson
Acclaimed Contributor

Re: Program can not be run in the cron environment

Hi :

> Dennis: > JRF: That's not relevant. If you source something, you use your current shell. The #! is just a comment. You also can make the file non-executable so it is never executed as a script.

I am quite aware of both statements. When I said that, "I only use POSIX or Korn shells so the syntax of the included material should be compatible in either case" I meant that I include the interpreter line as documentation for the body of the included file's contents if/when a human reads the file's contents. If I was running the standard POSIX shell but attempted to source a file containing 'setenv' statements from your favorite C-shell, the POSIX shell is going to complain loudly when it encounters the 'setenv' statement (not the interpreter line).

Regards!

...JRF...
arking1981
Frequent Advisor

Re: Program can not be run in the cron environment

Dear all,

Thanks for your great help.
Now my cronjob is working.

I am closing this thread now.
Apologize for replying so late, just too busy.

Regards
Kang
Hello world...
arking1981
Frequent Advisor

Re: Program can not be run in the cron environment

Solved based on the comments
Hello world...