Update:
New version
https://nextcloud.salzmann.solutions/index.php/s/7NBXEFdLB32DMit
Zip Download link:
https://nextcloud.salzmann.solutions/index.php/s/7NBXEFdLB32DMit/download
I merged it into two files. Two files makes sense, because you need a separate backup file for every instance.
The ping localhost is just a delay without output. Changed it to 30s just to be sure.
Made the script a little bit easier by using variables.
I removed all the output suppression. I like to be able to see the output if I run it manually and there is no output if run by task scheduler. For testing you can put the "pause" into the files. That way the script stops until you put a button.