crontab下执行shell脚本报错

来源:百度知道 编辑:UC知道 时间:2024/09/24 22:06:57
小第想在AIX系统上使用crontab执行一个shell脚本,但所以一直报错,报错内容是"A file or directory in the path name does not exist.
ksh: uncommu.sql: 0403-016 Cannot find or open the file",uncommu.sql的可执行权限已经设置过了.crontab是这样写的57 * * * * /sybase/testwork/uncommunication/uncommu.sh 2>>/sybase/testwork/uncommunication/cuo.out,shell脚本内容是str=`date +%y%m%d`
su - sybase -c "isql -Uic_maint -Psybmaint -Sgcard32_db1 <uncommu.sql> $str.txt".
哪位大虾帮小弟看一下是什么问题啊,在线急等.问题解决了一定加分!

uncommu.sql前需要添加绝对路径

这种问题一般都是环境变量没有设置好

,skjskaf

http://yangtingkun.itpub.net/post/468/51392