shutdown pc when finishing the task

Hello Group!
I have created a task where it copies some folders and then I have told it in the advanced options of the task to run a BAT where I have the shutdown (run-script-after). Up to here everything great.

But now I have the problem that when I want to restore a file or folder from the backup, it also executes the shutdown.

Do you know if there is a way to make it execute the shutdown ONLY when doing a backup?

The operation is passed in as an environment variable. You can check in the script if it is a Backup:

REM DUPLICATI__OPERATIONNAME
REM Operation name can be any of the operations that Duplicati supports. For
REM example it can be “Backup”, “Cleanup”, “Restore”, or “DeleteAllButN”.
REM This value cannot be changed by writing it back!

Thanks for the prompt response.
I’m gonna check it.