-3

I have service. I want to verify, if date now == some date -> do something

How can I use Windows Task Scheduler for event that fires yearly in one and the same day (November, 15 for example)

Please give me example of using Windows Task Scheduler (classes, arguments, properties, methods) related with some date.

user2889383
  • 89
  • 1
  • 2
  • 8

1 Answers1

9

For something like this I believe you should be making an app to perform your task and then quit, and then use the Windows Task Scheduler to run the job at the correct time.

Running a program all year to run a method once a year is not really a good design. Plus you have to consider that the computer or server that it is running on will almost certainly not stay online for the whole year, so how will your program cope with reboots etc.

Ashigore
  • 4,618
  • 1
  • 19
  • 39
  • I have service. I want to verify, if date now = some date -> do something – user2889383 Oct 17 '13 at 10:39
  • @user2889383 - considering you've shown no attempt of your own so far, this is a surprisingly good answer. You need to do some research yourself first. –  Oct 17 '13 at 10:46
  • @user2889383, no, you don't need to do that at all. Just make your application do whatever it needs to do, then use Windows Task Scheduler to schedule it. – Arran Oct 17 '13 at 10:55
  • Please, give me something example with Windows Task Scheduler using. – user2889383 Oct 17 '13 at 11:52