I need to have a process that compiles daily data into an PDF that will be attached into an email. I have already used MSSQL to send emails in the application being developed and would like to continue to use MSSQL as the email processor.
In my research, I have found that this can be achieved by creating a Windows Service. But, since I am only really wanting this process to run once a day; keeping an always active Windows Service seems to be overkill.
I have never used task scheduler to run a self-built application. I want to make sure that I am going about it the correct way. As I understand, I will have to...
- Create a new project (Project X) in Visual Studio
- Program (Project X) to generate the PDF and interact with MSSQL to send the email
- Build (Project X) into an EXE
- Schedule the EXE using Task Scheduler to run on whatever schedule I need.
Are there any security aspects I should be concerned about? Only ones I can think of are encrypting my MSSQL connection string; and, of course, keeping the EXE out of the web accessible directory the web app resides in.
Thank you in advance for the help/confirmation as I know some will think this is a silly question.