Trigger an URL without waiting for its result
To trigger an URL, you simply execute the following command (curl is alias of Invoke-WebRequest):
curl "http://localhost:62037/run_proc.aspx"
If the page requires longer time to complete, then, this command will block other process. To avoid it, we use Start-Job command to execute the curl command:
Start-Job -Name syncCourse -ScriptBlock { curl "http://localhost:62037/run_proc.aspx" }
To view the job status, run the following command:
Get-Job
Notes: the job is running in your current "session" - meaning, if you open another Powershell console, Get-Job will return empty result.
curl "http://localhost:62037/run_proc.aspx"
If the page requires longer time to complete, then, this command will block other process. To avoid it, we use Start-Job command to execute the curl command:
Start-Job -Name syncCourse -ScriptBlock { curl "http://localhost:62037/run_proc.aspx" }
To view the job status, run the following command:
Get-Job
Notes: the job is running in your current "session" - meaning, if you open another Powershell console, Get-Job will return empty result.
Comments
Post a Comment