Timeout in "Execute before / after"

English Support for Syncovery on Windows.
Post Reply
JoniP
Posts: 4
Joined: Tue Apr 02, 2024 9:21 am

Timeout in "Execute before / after"

Post 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.

tobias
Posts: 1676
Joined: Tue Mar 31, 2020 7:37 pm

Re: Timeout in "Execute before / after"

Post by tobias »

So when the exe is killed, the job should not run, correct?

JoniP
Posts: 4
Joined: Tue Apr 02, 2024 9:21 am

Re: Timeout in "Execute before / after"

Post 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.

tobias
Posts: 1676
Joined: Tue Mar 31, 2020 7:37 pm

Re: Timeout in "Execute before / after"

Post 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.

tobias
Posts: 1676
Joined: Tue Mar 31, 2020 7:37 pm

Re: Timeout in "Execute before / after"

Post 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$

JoniP
Posts: 4
Joined: Tue Apr 02, 2024 9:21 am

Re: Timeout in "Execute before / after"

Post 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?

tobias
Posts: 1676
Joined: Tue Mar 31, 2020 7:37 pm

Re: Timeout in "Execute before / after"

Post by tobias »

It kills only the process that it started, based on the handle that was returned by Windows when the process was created.

JoniP
Posts: 4
Joined: Tue Apr 02, 2024 9:21 am

Re: Timeout in "Execute before / after"

Post by JoniP »

Thank you this is perfect.

Post Reply