cron shell scripts

From: Steven Sim (steven.sim@faplccc.net)
Date: Mon Mar 06 2006 - 10:53:45 EST


Gurus;

It has been my impression for some time now that any scripts written to
be CRONned has to be sh shell scripts, like so;

#!/bin/sh

If the script is based on a shell other than sh, e.g. C shell or Korn
shell, then the appropriate CRON entry should be

* * * * * /usr/bin/ksh <Korn shell script>

or

* * * * * /usr/bin/csh <C shell script>

and not simply

* * * * * <Korn shell script>
or

* * * * * <C shell script>

This is because the CRON daemon simply shells the scripts using sh and
does not actually fork a seperate shell script process to run the script.

Am I mistaken??

Warmest Regards
Steven Sim

Fujitsu Asia Pte. Ltd.
_____________________________________________________

This e-mail is confidential and may also be privileged. If you are not the intended recipient, please notify us immediately. You should not copy or use it for any purpose, nor disclose its contents to any other person.

Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by it.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:39:12 EDT