我正在尝试使用crontab计划一个包含以下命令的shell脚本(batch1.sh):
/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 datamover命令。
以下是安排脚本的crontab条目:
#!/bin/bash
57 15 * * * /home/dmuser/BAF_dev/production/test_CS/batch1.sh
我得到"无法访问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
答案 0 :(得分:0)
您是否可以手动运行脚本?
您是否尝试在命令前添加sudo
?
你在root下运行crontab吗?值得一试。也许这些权利存在问题。
答案 1 :(得分:0)
尝试在crontab中的/home/dmuser/BAF_dev/production/test_CS/batch1.sh前添加/ bin / bash