Page 1 of 1

Timeout in "Execute before / after"

Posted: Tue Apr 02, 2024 9:33 am
by JoniP
Hi,

Is it possible to specify long timeout in before/after commands? You can specify timeout like this $60$ but something like $1800$ does not work. I think the maximum was 900-999 seconds.

We have a Syncovery task that runs hourly and executes x.exe on before command (unlimited wait). After the x.exe finishes Syncovery then continues and transfers the files that x.exe saved.

Sometimes this exe hangs, Syncovery profile does not finish and so the next scheduled run does not start.

So I was wondering if it is possible to somehow specify longer timeout to achieve this:

Before:
Run exe and wait for 1800 seconds.

After:
Kill that exe.

Re: Timeout in "Execute before / after"

Posted: Tue Apr 02, 2024 10:40 pm
by tobias
So when the exe is killed, the job should not run, correct?

Re: Timeout in "Execute before / after"

Posted: Wed Apr 03, 2024 6:15 am
by JoniP
Does not matter. This Exe should finish whatever it is doing in about 1200 seconds. If for some reason it is then running after 1800 seconds then we would like to kill it and the Syncovery job continues & finishes. Then the next scheduled job would work again.

I now have a bat file that is executed on before command and there is wait specified in the bat file before taskkill but it would be much more convenient to specify longer wait in before listbox and then specify taskkill in after listbox.

Re: Timeout in "Execute before / after"

Posted: Wed Apr 03, 2024 8:27 am
by tobias
Hello,
great, I have added the ability to specify a four digit timeout, and also to kill the process if it times out. That kill would happen before the job runs. Alternatively, you can use your own taskkill command in the "after" command line.

Re: Timeout in "Execute before / after"

Posted: Wed Apr 03, 2024 11:56 pm
by tobias
Hello,
the new version 10.13.9 will now allow long timeouts like

$1800$

You can also let Syncovery kill the exe if it still runs after the timeout. For that, prepend the line with the @ sign:

@$1800$

Re: Timeout in "Execute before / after"

Posted: Thu Apr 04, 2024 8:05 am
by JoniP
Thank you!

Btw how does Syncovery kill the exe with @ sign. I mean if i launch notepad.exe in before listbox does it somehow then kill the notepad.exe that Syncovery launched based on PID or does it kill all notepad.exe instances that are running?

Re: Timeout in "Execute before / after"

Posted: Thu Apr 04, 2024 8:37 am
by tobias
It kills only the process that it started, based on the handle that was returned by Windows when the process was created.

Re: Timeout in "Execute before / after"

Posted: Thu Apr 04, 2024 10:16 am
by JoniP
Thank you this is perfect.