Schedule Powershell script to run every hour

RonyA picture RonyA · May 1, 2016 · Viewed 14.1k times · Source

Please check this picture as following
enter image description here

I was looking at Window task scheduler to schedule my script to run each hour. The script will do some checks and will send an email .

I did not find options to schedule it for each 1 hour. I only found for every day, daily, weekly and so on.

Answer

Aman Sharma picture Aman Sharma · May 1, 2016

Task scheduler does show the option to configure hourly trigger as shown below.

Trigger for a Task in Task Scheduler

Another option you have is to run your PowerShell script as a Service and add the logic in your PowerShell script to trigger your main code once every hour.

Refer: Video: Running PowerShell scripts as a real Windows Service!
How To Create a User-Defined Service