AppWorx, Dollar Universe and Sysload Community

Expand all | Collapse all

Windows Job not liking "Timeout!" commands within .bat file

  • 1.  Windows Job not liking "Timeout!" commands within .bat file

    Posted Jul 26, 2017 10:19 AM
    Hi,
    A user of ours is trying to execute a .bat file and getting the following message in my Report, albeit my Job is not failing..

    ERROR: Input redirection is not supported, exiting the process immediately.


    When I checked this on google I found that this is due to a timeout command within my .bat file.

    Is there any way around this from my Windows Job or is a change required to the .bat file to allow my user runs this batch file from Automic?

    John.



  • 2.  Windows Job not liking "Timeout!" commands within .bat file

    Posted Jul 27, 2017 04:45 AM
    Hi.

    Timeout detects input redirection (for a reason), and thus won't work out of the box with Automic. CA actually recommends using "ping" instead:

    https://www.ca.com/us/services-support/ca-support/ca-support-online/knowledge-base-articles.tec1473545.html

    It seems possible to trick "timeout" into working even in UC4 though, this line works for me inside a Windows job:

    start cmd.exe /c timeout /NOBREAK /T 5

    Waits five seconds, just as desired.

    Best,
    Carsten


  • 3.  Windows Job not liking "Timeout!" commands within .bat file

    Posted Jul 27, 2017 05:51 AM
    Carsten_Schmitz_7883 Thanks for that.