job execute after not running

English Support for Syncovery on Windows.
PeterC
Posts: 20
Joined: Thu Jan 05, 2023 11:18 pm

job execute after not running

Post by PeterC »

I have a simple cmd file that I want to run after a profile is finished so I entered the full path to the file (see screenclip) but it doesn't run.

It timesout with the following in the log file:
Executing: C:\Users\Peter\pj\Scripts and Reg files\WombatSleepNoPause.cmd
Executed C:\Users\Peter\pj\Scripts and Reg files\WombatSleepNoPause.cmd
The external command line took too long (Timeout: 120 sec).

The profile runs as administrator.

The cmd file runs ok if I try it outside of Syncovery.
20230130 execute after.jpg
20230130 execute after.jpg (30.94 KiB) Viewed 2457 times

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

Re: job execute after not running

Post by tobias »

Hello,
the script is probably run in a different context, so you need to debug it.

For example, add logging.

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

Re: job execute after not running

Post by PeterC »

I don't know what you mean by "different context".

I have stripped the job specs down to one line directly entered in the Job > Execute After box.

The command is "C:\CustomApps\ProgramFiles\SPSSuite\SyMenuSuite\PsTools_sps\psshutdown64.exe -d -t 0 -u administrator -p password \\wombat"

This entry still timesout without running.

Hopefully you can suggest a solution.

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

Re: job execute after not running

Post by tobias »

Hello,
you need to ask the developer of psshutdown64.exe on how to to debug it.

What are you trying to achieve? Maybe we can find a better way to do it.

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

Re: job execute after not running

Post by PeterC »

I'm trying to suspend/sleep the computer called Wombat. Any suggestions?

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

Re: job execute after not running

Post by tobias »

So Wombat is another PC on the LAN?

What I meant with "context" is for example, if the scheduler runs as a service, it is a completely different environment from normal applications and some external tools may not work in that context.

You can compare a log file where it works agains one where it doesn't. Look at the top in the log file where it says "Running as".

But that's not the only difference. It could also be a Firewall or other things preventing the script.

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

Re: job execute after not running

Post by PeterC »

Yes, Wombat is another PC on the local network.

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

Re: job execute after not running

Post by PeterC »

I'm still having problems running a simple job after the profile runs.

I've got a simple cmd file that's only got the command "pause" in it and it won't run in the background. It will run if I do an Attended run.

Any ideas?

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

Re: job execute after not running

Post by tobias »

Hello,
there are many different ways to start a profile "in the background". You really need to provide more details.

If you let it start by the scheduler and the scheduler runs as a service, then you surely won't see the command prompt window that runs the CMD file.

You need to compare a working Syncovery log file versus non-working. Look at "Running As" at the top.

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

Re: job execute after not running

Post by PeterC »

When I run the profile Attended the cmd file executes ok - log says "Running as : Tornado\Peter (not Admin)"

When the profile is run by the scheduler service the cmd file timesout - log says "Running as : Tornado\Administrator (Admin)"

I can successfully run the cmd file outside of Syncovery - both as user Peter as well as Administrator.

Post Reply