i need to run a script via the crontab(no problem) but am having problems with passing parameters to it. in my script i use the getopts function to determine what to do with the parameters.
my crontab entry looks like
30 12 * * * /directory/script -abc >logfile 2>&1
if i run the script from the command line i have no problems. my parameters are needly handled by the script.
my script reads:
while getopts shbm name
do
case $name in
s) action;;
h) usage;;
b) action;;
m) action;;
esac
done
please assist.
my crontab entry looks like
30 12 * * * /directory/script -abc >logfile 2>&1
if i run the script from the command line i have no problems. my parameters are needly handled by the script.
my script reads:
while getopts shbm name
do
case $name in
s) action;;
h) usage;;
b) action;;
m) action;;
esac
done
please assist.