in reply to Script runs from command line but not via crontab
so that you can see the output of the script, including error messages. (It may or may not be mailed to you by default depending on your system.)1,6,11,16,21,26,31,36,41,46,51,56 * * * * cgi-bin/dbman/db2sql.sh>/tmp +/xxx.log 2>&1
The usual problem with things that refuse to run under cron is that cron doesn't run your .profile or .bash_profile or .bashrc... before your scripts run. Typically you will find an environment variable that needs to be set. If there actually is a shell script at db2sql.sh, you could try calling .profile or .bash_profile from it.
|
|---|