SVN error when run by crontab -- SOLVED -
i wrote shell script run svn, following:
#! /bin/sh cd /data/tmpsvn/ export lc_all=zh_cn.utf8 date "+getsvn - [%y-%m-%d %t]" >>svn.log 2>&1 /usr/local/bin/svn checkout http://ip >> svn.log 2>&1
then wrote crontab:
*/5 * * * * sh /data/htdocs/zlbz-test/tools/get_svn_all.sh 1>/dev/null 2>&1
some errors occur shown in log file:
getsvn - [2015-05-12 14:40:01] /usr/local/bin/svn: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: no such file or directory
but when execute command in terminal, work well.
can people explain has happened? thanks~
it's been solve according vadim landa's link in comment. added line in script:
export ld_library_path=$ld_library_path:/usr/local/openssl/lib/
most probably, ld_library_path variable set in shell profile, not in crontab. check out thread: python cannot find shared library in cron
Comments
Post a Comment