I am about to implement the schduled kind of task, not sure whether should implement in window sevice or w开发者_JAVA技巧indow schduler.
The use case is, there will be one executable deployed on the mechine, which is attached to the scanner. For every five minutes, the exe will be reading the scanned files from the specified folder and upload the files to the server.
What would be the best solution for this use case.
Thanks
Use a scheduled task. A windows service would have to be specially written, and this is perfectly suited for a simple job which runs at 5 minute intervals.
You'll find some good comparisons here:
windows service vs scheduled task
Personally, I would use the Windows Service because it is easier to troubleshoot, locate the logs and restart if necessary.
精彩评论