Call URL From Task Scheduler

Sometimes we need to call/execute some task or program on every x minute/hour/daily etc. for example take daily backup or call daily attendance service or delete temp file etc. we can do manually but its looks like labor work or we can say boring task, to do this we can create schedules with help of Powershell.

1. Open Task Scheduler.

2. Click on Task Scheduler Library > Create Task…

3. Enter some meaningful names and select the radio button as per choice.

  • Runs only when you logged in.
  • Runs whether you’re logged in or not.

4. Now time to set time when you want to run/execute this scheduler.

Click on Trigger > New… and select time as per requirements.

5. Set Program and URL which you want to call.

  • Action: Start a program
  • Program/script: powershell.exe
  • Arguments: -Command "Invoke-WebRequest YOUR-URL"
  • Click on OK button.

Click the OK button till the below window.

Done, on set time your URL will call and you can check “Last Run Time” and “Last Run Result” to clearify.

8 Comments

  1. Swapna Varghese

    one query but api is hitting only when I give IP address.What can be the reason?

    0
    0
    Reply
  2. Swapna Varghese

    one query but api is hitting only when I give IP address

    0
    0
    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe

Select Categories