Java 批处理作业未使用stop命令行JobRunner停止

Java 批处理作业未使用stop命令行JobRunner停止,java,spring,Java,Spring,使用应用程序生成命令以启动作业: java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9875 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=C:/Users/rishabh/Desk

使用应用程序生成命令以启动作业:

java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9875 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=C:/Users/rishabh/Desktop/jmxremote.password -Dcom.sun.management.jmxremote.access.file=C:/Users/rishabh/Desktop/jmx.access -cp C:\Users\rishabh\slave-example-0.0.1-SNAPSHOT.jar org.springframework.batch.core.launch.support.CommandLineJobRunner application-context.xml sampleJob correlationId=71925ee3-4879-4dee-8177-fa347893df88
现在,当我试图用“-stop”参数停止此工作时,如下所示:

java -cp C:\Users\rishabh.pandey\slave-example-0.0.1-SNAPSHOT.jar org.springframework.batch.core.launch.support.CommandLineJobRunner -stop application-context.xml sampleJob 
这使得:

作业因错误而终止找不到作业=sampleJob的运行执行 带有JobexecutionNotRunningException


请提供示例命令示例。我还希望作业数据的存储库状态稳定。

我获取了correlationId存储库,然后使用特定的correlationId运行命令。 早些时候,我使用了作业名称和新的correlationId,它使用的correlationId不在作业存储库中