Run script error
I have a script run on unix and linux server , I found that if run it at shell , it works fine , but if run on crontab job , it is not work , can advise what is the different to run on shell and crontab job ? how can I fix it ? thx
the script like below !/bin/bash if [ `date +%d` == 18 ] then xx else yy fi |
Check the permission of the script.
What entry are you providing in the /etc/crontab entry? |
Depends what you mean by 'not work' ... details please.
In any case, the most likely issue is that cron doesn't have much of an environment (eg minimal $PATH), so all cmds should be referenced by their full names eg /bin/date instead of just 'date' |
All times are GMT -5. The time now is 10:35 PM. |