I am writing a console application that will do two tasks.
The app will be run by a Windows scheduler once a day during off-peak hours, when it does run it will do the following:
- Scan 5-6 folders with several hundred files, update a SQL table with the file names
- This app will be referenced by two other applications, these applications will utilize a public method to write exceptions to a SQL table. The exceptions would more of business rule exceptions.
There is a possibility that the app will be called by the scheduler to do its assigned task and also by the other applications at the same time. How would I design the app to ensure that there are no conflicts. I am thinking along the lines of multi threading, parallel tasks?