Timeout on execSSH command
Posted: Fri Jul 11, 2014 5:25 am
I've written a project to execute an execSSH task with a timeout but it doesn't seem to work.
Here's the project:
The script I'm calling is
And the output I get is:
C.
Here's the project:
Code: Select all
<project name="Overrun Test" mainModule="Main" version="2.0">
<description>Test overrun handling</description>
<variable name="RETURNCODE" value="" />
<module name="Main">
<print label="Start" version="1.0">
<![CDATA[Starting overrun test]]>
</print>
<execSSH label="Remote Wait" resourceId="DevServer_SCP" command="~/waiting.sh" commandTimeout="10" returnCodeVariable="RETURNCODE" version="1.0" onError="continue" />
<print label="ReturnCode" version="1.0">
<![CDATA[Finished with a return code of ${RETURNCODE}]]>
</print>
<print label="End" version="1.0">
<![CDATA[End overrun test]]>
</print>
</module>
</project>
The script I'm calling is
Code: Select all
#!/usr/bin/sh
echo "Sleeping for 30 seconds \c"
sleep 30
echo done!
And the output I get is:
11/7/14 11:16:55 INFO Start Date and Time: 11/7/14 11:16:55What have I done wrong?
11/7/14 11:16:55 INFO Job Number: 1000000000182
11/7/14 11:16:55 INFO Project Name: /CE TEST/Overrun Test
11/7/14 11:16:55 INFO Submitted By: chris.evans
11/7/14 11:16:55 INFO GoAnywhere Director 4.6.2 running on Windows Server 2012 6.2 (amd64)
11/7/14 11:16:55 INFO Executing project 'Overrun Test'
11/7/14 11:16:55 INFO Project location: C:\Program Files\Linoma Software\GoAnywhere\userdata\projects\CE TEST\Overrun Test.xml
11/7/14 11:16:55 INFO Executing module 'Main'
11/7/14 11:16:55 INFO Executing task 'print 1.0 (Start)'
11/7/14 11:16:55 INFO Starting overrun test
11/7/14 11:16:55 INFO Finished task 'print 1.0 (Start)'
11/7/14 11:16:55 INFO Executing task 'execSSH 1.0 (Remote Wait)'
11/7/14 11:17:25 INFO Sleeping for 30 seconds done!
11/7/14 11:17:25 INFO The Command executed successfully with return code '0'.
11/7/14 11:17:25 INFO Finished task 'execSSH 1.0 (Remote Wait)'
11/7/14 11:17:25 INFO Executing task 'print 1.0 (ReturnCode)'
11/7/14 11:17:25 INFO Finished with a return code of 0
11/7/14 11:17:25 INFO Finished task 'print 1.0 (ReturnCode)'
11/7/14 11:17:25 INFO Executing task 'print 1.0 (End)'
11/7/14 11:17:25 INFO End overrun test
11/7/14 11:17:25 INFO Finished task 'print 1.0 (End)'
11/7/14 11:17:25 INFO Finished module 'Main'
11/7/14 11:17:25 INFO Finished project 'Overrun Test'
11/7/14 11:17:25 INFO End Date and Time: 11/7/14 11:17:25
C.