I have created a job that opens a webpage on our internal LAN. The webpage takes 4 to 5 minutes to complete it's process which is expected so I set a high timeout of 10 minutes.
The powershell job seems to run fine but I always get an error for getresponse get This is the error
The corresponding line is '$response = $request.GetResponse() '. Correct the script and reschedule the job. The error information returned by PowerShell is: 'Exception calling "GetResponse" with "0" argument(s): "The
operation has timed out"
Code:
$request =[System.Net.WebRequest]::Create("http://myinternalsite.com") $request.timeout = 60000; # 10 Minutes $response = $request.GetResponse() $response.Close()I tried searching for a solution but nothing seemed to help me.
How can I resolve this issue?
Thanks