1831647 Members
2085 Online
110029 Solutions
New Discussion

crontab

 
Nobody's Hero
Valued Contributor

crontab

When I edit then save my crontab, I get the following warning:

warning: commands will be executed using /usr/bin/sh

Is there any way to resolve this warning?

Thanks,
Bob Menefee
UNIX IS GOOD
7 REPLIES 7
Mark Vollmers
Esteemed Contributor

Re: crontab

Bob-

depends. is there a reason to worry about the scripts being run in usr/bin/sh? that is the default kernal, and shouldn't cause any issues unless you wrote the script in another (csh, for example). I think it is just a head's up type of thing and personally I wouldn't worry about it.

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
A. Clay Stephenson
Acclaimed Contributor

Re: crontab

That is really simply informational and not really a warning. It is meant to tell you that for example, if your cronjob is a csh script or a perl script then it will not execute UNLESS you put a 'shebang' e.g. #!/usr/bin/csh
or #!/usr/bin/perl in as the first line.

If it ain't broke, I can fix that.
Patrick Wallek
Honored Contributor

Re: crontab

That message is not anything to worry about. It is more an informational message than anything.

It is just telling you that any commands that are run from the crontab will be executing using the POSIX shell (/usr/bin/sh).

Helen French
Honored Contributor

Re: crontab

Hi Robert:

This message will be NORMAL, depends on your usage. If you directly edit the cron file, then shell will accept the default environmental variables, and will display this message. If you particularly needs the cron file to be executed by a shell, then you need to add this at the starting of the file:

SHELL=/usr/bin/ksh;export SHELL
( for ksh).

HTH,
Shiju
Life is a promise, fulfill it!
Helen French
Honored Contributor

Re: crontab

Hi Robert:

Check this document for the correct steps to edit a cron file (TKB #KBRC00000924):

http://us-support2.external.hp.com/cki/bin/doc.pl/sid=05f18d471c2da471f8/screen=ckiDisplayDocument?docId=200000058668843

HTH,
Shiju
Life is a promise, fulfill it!
MANOJ SRIVASTAVA
Honored Contributor

Re: crontab

Hi Robert


This is a standard message and not any warning . Actually you can scheule cron either buy crontab -e , which helps you editing and schduling ot edit /usr/spool/cron/crontabs/ and then restarting the cron . I dont think that there is a way to stop getting this message.



Manoj Srivastava
Sanjay_6
Honored Contributor

Re: crontab

Hi Robert,

This is not an error message. It is just that the system is tellling you that your cron jobs will be executed using the /usr/bin/sh shell.

Hope this helps.

regds