Announcement Announcement Module
Collapse
No announcement yet.
Execute a .bat Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Execute a .bat

    Hi,

    I'm trying to create a step, that has just to execute a .bat.

    <bean id="cmdStartWorkFlow" class="org.springframework.batch.core.step.tasklet .SystemCommandTasklet" scope="step">
    <property name="command" value="my_test.bat" />

    <property name="environmentParams" value=""/>

    <property name="timeout" value="${job.package.startWF.cmd.timeout}" />

    <property name="taskExecutor">
    <bean class="org.springframework.core.task.SyncTaskExecu tor" />
    </property>
    </bean>


    After many trials, I have discovered that there is some issues with the content of the .bat.
    If I write in the .bat some dos command like mkdir, everything works fine, but if I use java or set or even the comments, the .bat does nothing or stucks there and goes in timeout.

    Any idea on what I am doing wrong?

    Thanks in advance

  • #2
    im not familiar with windows, but as a sanity check, does this bat file run to completion standalone (ie: outside spring batch?)

    Comment

    Working...
    X