Cannot prevent Shutdown from "Run a Command - On Completion"

Get help for specific problems
Posts: 17
Joined: 11 Mar 2021

Bordonbert

Hi. My problem is with Version: 11.8, 64 bit, on PC Windows 10.

I'm new to FreeFileSync and have just set up my first backup task saved as a batch file. There is no problem in setting up the task to do what I want, it is remarkably clear in most aspects. However, every time it runs it completes successfully but the PC is shut down and won't respond to any wake up actions as it normally does.

In the task settings I have "Run a command" showing "On Completion" as it seems the best of the 3 options to choose. The others are "On Errors" and "On Success". There is no option available to just do nothing. I cannot remove the "Example: shutdown /s /t 60" from the editbox. If I click into the editbox it empties but when I click out the Example is put back in again greyed out and it seems as though it is acting on that.

Is there some sort of a null command needed to be put in there to tell the FFS to do nothing when it completes, or is there maybe something subtle about this I am missing?
User avatar
Posts: 2300
Joined: 22 Aug 2012

Plerry

> There is no option available to just do nothing.
Simply leaving the Command Line box blank (=showing the grayed out "Example: shutdown /s /t 60") will execute the empty command line and do nothing, irrespective of selecting "On Completion", "On Errors" or "On Success".

If you are running a saved *.ffs_batch file, re-save the FFS batch file and make sure that the "When Finished" field is blank and not "System: Sleep" or "System: Shut down".
Posts: 17
Joined: 11 Mar 2021

Bordonbert

Got it!

Thanks for replying Plerry, you confirmed what I already thought would be the case but the actions didn't follow what I had carefully selected in Synchronisation Settings. However, I've just rechecked the batch file setup - again - and I've found my mistake.

I ran a Compare and noticed that the only file it found was actually the batch file itself which was some 25 bytes larger than the previous backed up version. I got suspicious and looked at the batch properties again. They looked ok, it seemed a red herring. But when I resaved the more up to date version of the batch file I saw my error. In the Save dialogue there is another "When Finished:" option to fill in just as you said. For some reason this one had "Close" in it rather than one of the logical suggested commands of Nothing or System:Sleep or System:Shutdown. That was screwing up its actions.

I've corrected this to both do nothing and to use "System:Sleep" and both actions work as they should. Thanks for the advice. I can be sure to remember that second option in future.
User avatar
Site Admin
Posts: 7059
Joined: 9 Dec 2007

Zenju

In the Save dialogue there is another "When Finished:" option to fill in just as you said. For some reason this one had "Close" in it rather than one of the logical suggested commands of Nothing or System:Sleep or System:Shutdown. Bordonbert, 11 Mar 2021, 12:32
There is no "close" option in this dialog in FFS 11.8...
Posts: 17
Joined: 11 Mar 2021

Bordonbert

Agreed without any argument Zenju. But there it was as clear as day and bold as brass. I have no idea where it came from or how it got there. It shouldn't have been but it was. It was an error of some sort and I have no doubt I caused it in some way. Maybe something from when I was playing with the Sync Settings - Run A Command entry, I don't know. It was there until I entered the editbox and deleted it by selecting one of the genuine options then reverting to the null option again. After that everything straightened out.

EDIT: I've just had a play and even manually editing the batch file XML to "Close" then reopening FFS to run it up isn't possible. The error is noticed and flagged up. I agree it is a mystery but it really was there. Gremlins?
User avatar
Site Admin
Posts: 7059
Joined: 9 Dec 2007

Zenju

I believe this "close" option was used in an old FFS version, so that might explain the symptoms.