Reputation: 8530
I am working solaris 10 and using bash shell.
I have a shell script which I run manually it works fine.
/shellscriptfullpath.sh
I have added the same to crontab and it stopped from working.
later I have added the shell path as first command and tested,it started working.
#!/bin/bash
some of my scripts run without shell path also.
what is the difference?
Upvotes: 0
Views: 696
Reputation: 3967
When you add in cron the script gets executed in default shell (mostly csh or ksh) To avoid this you have to add the first line saying which shell you need.
Upvotes: 1