I got a couple of legacy batch scripts used for file synchronization. They use robocopy
.
According to the documentation, by default, there's a retry mechanism : one million retries, 30 seconds between retries. So, if I understand well, if something is going bad (for instance not enough disk space in the destination folder), the script will run during approx 347 days before it ends.
I do appreciate that a retry mechanism exists, but I don't understand why the default behaviour is like that.
Default parameters values are supposed to match common and basic use cases, and for a file copy, I don't see the point of retrying almost forever; I mean, if it still does not work after, let's say, 5 times, it means that something somewhere should be fixed (network down, disk dead...). It's worth stopping and raising an error.
What could be the reasons for such default behaviour ?