Thank you for your post.
I am able to duplicate the problem. I have a script that changes the URL, and it works locally, but on the Server with a schedule, I receive a -1 error.
I have forwarded your post along with my example to our Development and Software Quality Assurance (Testing) departments for review. I will post again when I receive information.