日期:2014-05-16  浏览次数:20826 次

crontsb定时调度是root用户运行的吗?
Unix:
脚本中调用可执行文件oraunload,脚本编写没问题:
oraunload zjhd/zjhd "select * from accj_atom_list" filename.txt
实现功能是根据参数将表中的数据导出到文件,单独运行脚本可以实现,使用crontab定时调度脚本时却出现
oraunload:not found 的错误,在我的用户下配置oraunload所在目录的环境变量后依然出现相同的问题。
想知道crontab是不是root用户调用的,请大神指教!

------解决方案--------------------
  crontab  is the program used to install, deinstall or list the tables used to drive the cron(8) daemon in Vixie Cron.  Each
       user can have their own crontab, and though these are files in /var/spool/cron/crontabs, they are not intended to be edited
       directly.

------解决方案--------------------
先列出来,这个是我服务器备份用的一个例子

0 20 * * * /home/backup/project_backup.sh
每天晚上八点执行脚本,将项目下的文件备份一次。
建议lz,先写个简单的脚本测试,看能否成功,再论是否只有执行oraunload时失败?