Possible duplicates:
Windows service and scheduled task
Windows Service Vs Simple Program
I am trying to create a program that runs periodically (say, every 5 minutes) or launches a program and runs it inside it (every 5 minutes).
The program should get data from the database when it is executed, and then write this (for now) to say the info.txt file (there are no sensitive things). every time he writes a file, he must overwrite existing information in the file.
The program should also start automatically when Windows starts. (therefore, there is no need to log into the computer and execute .exe [if this is a regular program, not a service])
In between the periods that he runs the program, there is nothing to do.
Therefore, should I run this program as a Windows service or use the task scheduler to periodically run the program for this? My goal is for this program to work as smoothly as possible without clogging up resources. (for example, it does not need more than 5% of the processor)
I hope my question was clear enough.
Raskaroth
source share