我正在尝试调度一个shell脚本(batch1.sh),并使用crontab包含以下命令:
/opt/teradata/client/14.10/datamover/commandline/datamove start -job_name DM_JOB_PROPOSAL_CREDIT_LIMIT -sync > /home/dmuser/BAF_dev/production/test_CS/batch1.out 2>&1命令datamove是Teradata数据移动器命令。
以下是用于调度脚本的crontab条目:
#!/bin/bash
57 15 * * * /home/dmuser/BAF_dev/production/test_CS/batch1.sh我收到"unable to access DmCommandline.jar“错误。
crontab -l的输出:
#DO NOT EDIT THIS FILE - edit the master and reinstall.
#(/tmp/crontab.XXXX4NWuZV installed on Thu Apr 3 15:55:46 2014)
#(Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
#50 18 * * * CMD datamove start -job_name DM_JOB_LIMIT_DETAILS -sync >> /home/out.out
#18 19 * * * sh /home/dmuser/BAF_dev/production/01042014_ZA/batch1.sh
#!/bin/bash
57 15 * * * /home/dmuser/BAF_dev/production/test_CS/batch1.sh发布于 2014-04-03 19:06:56
您是否能够手动运行该脚本?
你有没有试着在命令前面加上sudo?
您是否在root下运行crontab?可能值得一试。也许是权利上的问题。
发布于 2014-04-03 19:21:03
尝试在crontab中的/home/dmuser/BAF_dev/production/test_CS/batch1.sh前面添加/bin/bash
https://stackoverflow.com/questions/22835565
复制相似问题