Page 2 of 2

Re: job execute after not running

Posted: Sun Feb 05, 2023 10:17 am
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.

Re: job execute after not running

Posted: Sun Feb 05, 2023 1:59 pm
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.

Re: job execute after not running

Posted: Mon Feb 06, 2023 7:05 am
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".

Re: job execute after not running

Posted: Mon Feb 06, 2023 10:02 am
by tobias
Hello,
thanks, wow, thanks for sharing the solution!