07 * * * * ./bin/bash;/bin/sh /home/liruwang/mocktime/MockDnsKpiTime.shjava
#!/bin/bashsql
./etc/profile
.~/.bash_profile
cd /home/liruwang/mocktime
export PGPASSWORD=postgresbash
/usr/java/jdk1.7.0_80/bin/java -jar MockDnsKpiTime.jar fileinput.txt fileoutput.txt
/usr/bin/psql -h xxx -p xxx -U xxx -d xxx -c "copy gmp_sa_dns_kpi from stdin with csv" < fileoutput.txtpost
若是遇到手动能够执行,crontab没法运行的状况,大胆的怀疑是环境变量的问题。dns
对于全部的路径,要用全局路径crontab
对于全部的程序,要用全局路径调用input