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.

9 Comments

  1. Manish Malik

    how do we add parameters (e.g. date) to this url being passed

    0
    0
    Reply
  2. Vasu R

    Great one..

    Though it is small thing, but surely helps people checking for a solution to call api from task scheduler.

    Thank you for saving my time.

    0
    0
    Reply
    1. Faisal Pathan

      Thanks for the feedback

      0
      0
      Reply
  3. Shruti

    Hello, can i invoke two diff webpages by one scheduler ?

    0
    0
    Reply
  4. Pablo

    THANK YOU!!! THAT WAS AWESOME BRO.

    0
    0
    Reply
  5. Hairstyles

    My partner and I absolutely love your blog and find the majority of your post’s to be exactly I’m looking for. can you offer guest writers to write content for yourself? I wouldn’t mind producing a post or elaborating on a lot of the subjects you write with regards to here. Again, awesome web log!

    0
    0
    Reply

Submit a Comment

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

Subscribe

Select Categories