title: How to develop a Windows scheduled task?
body: <p>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.</p>
  
  <p>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.</p>
  
  <p>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...</p>
  
  <ol>
  <li>Create a new project (Project X) in Visual Studio </li>
  <li>Program (Project X) to generate the PDF and interact with MSSQL to send the email</li>
  <li>Build (Project X) into an EXE</li>
  <li>Schedule the EXE using Task Scheduler to run on whatever schedule I need.</li>
  </ol>
  
  <p>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.</p>
  
  <p>Thank you in advance for the help/confirmation as I know some will think this is a silly question.</p>