2

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.

Udara Abeythilake
  • 1,215
  • 1
  • 20
  • 31
RonyA
  • 585
  • 3
  • 11
  • 26
  • scheduled task you don't need powershell for this. trigger -> repeat task every hour – lxx May 01 '16 at 05:23
  • I have one power shell script for some work and it will generate some report . So, I need the script to be executed per hour. – RonyA May 01 '16 at 05:24
  • call it from scheduled task eg task would be to start PowerShell and run the specified script see http://stackoverflow.com/questions/2071496/run-a-powershell-script-in-the-background-once-per-minute – lxx May 01 '16 at 05:26
  • Yes. But it is not showing any option to run per hourly . I can find there for daily, weekly and other options . I just edited question with one link . Can you please check it once. – RonyA May 01 '16 at 05:30
  • create the task then -> new trigger -> daily -> repeat task every hour is one way of doing it. Or do it on commandline – lxx May 01 '16 at 05:34
  • Thanks. Got it under Advance Option. – RonyA May 01 '16 at 05:36

2 Answers2

1

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

Aman Sharma
  • 1,930
  • 1
  • 17
  • 31
0

Call it from scheduled task eg task would be to start PowerShell and run the specified script see Run a powershell script in the background once per minute

create the task then -> new trigger -> daily -> repeat task every hour is one way of doing it. Or do it on commandline

Community
  • 1
  • 1
lxx
  • 1,326
  • 20
  • 30