运行autosys批处理作业并在Java中检查其状态

时间:2018-08-22 14:20:25

标签: java plink autosys

我需要运行一个autosys批处理作业,然后检查其状态,直到其状态更改为SU。 我已经编写了以下代码,但是它给了我以下异常:

def integrand(x, a, b):    
    return a * x ** 2 + b

a = 2    
b = 1    
I = quad(integrand,0,1,args=(a,b))    
I

代码:

CreateProcess error=2, The system cannot find the file specified

1 个答案:

答案 0 :(得分:1)

您的cmd应该是:

String[] cmds = {"C:\\Folder_Path\\plink.exe", "-ssh", "username@Server", "-pw", "Password", "sendevent", "-E", "FORCE_STARTJOB", "-j", "job-name"};

第一个参数是可执行文件名称。使用cmd时,由于找不到“ C:\ Folder_Path \ plink.exe -ssh username @ Server -pw密码”,因此出现错误。
您的exe文件是C:\ Folder_Path \ plink.exe,因此它应该是第一个参数。