job execute after not running

English Support for Syncovery on Windows.
tobias
Posts: 1603
Joined: Tue Mar 31, 2020 7:37 pm

Re: job execute after not running

Post by tobias »

Hello,
of course it times out, because the service cannot show a command prompt dialog and the PAUSE command runs forever.

Concerning your original request, you will just have to assume that your little command line tool cannot work when being run in a service context.

Therefore, please stop and uninstall the Syncovery Service and use the Background Scheduler instead. Then the script will be executed in a normal user context.

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

Re: job execute after not running

Post by tobias »

Hello,
by the way, to test if your CMD file is run, don't add PAUSE.

Add logging to your script.

For example, the first line in the script could be:

echo Start Time = %time% %date% >>C:\Logs\AsRunBackupRenamelog.txt

For this, you need to make sure that the folder C:\Logs exists.

Of course you can use a different path for logging.

PeterC
Posts: 20
Joined: Thu Jan 05, 2023 11:18 pm

Re: job execute after not running

Post by PeterC »

Thank you for all your suggestions They really helped.

I was able to get this to work by adding an undocumented command line parameter "-accepteula" to the psShutdown command. I found the parameter online via Google when I searched for "how to remotely sleep computer".

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

Re: job execute after not running

Post by tobias »

Hello,
thanks, wow, thanks for sharing the solution!

Post Reply