title: Scheduling a Windows Task Using ITaskScheduler Interface or any-other alternative
body: <p>So I have been doing some research on how to programmatically schedule a task, and as of now I haven't really found anything that useful or informative on it. It could be because I am searching for the wrong thing, but thats why I am hoping you guys can help me out.</p>
  
  <h2>Here is what I have :</h2>
  
  <p>I have a C# Windows Forms Application created in Visual Studio 2013... ideally what I had in mind was to create a button that opens up a form and allows the user to schedule a time and frequency of a task and then set it (if that task already exists, update it).</p>
  
  <p>So I was looking at the ITaskScheduler, but I am really clueless as to how I can use it and implement it. Not sure what assemblies I need to import etc... Was looking at <a href="http://www.pinvoke.net/default.aspx/Interfaces.ITaskScheduler" rel="nofollow">this Link</a> on <code>pinvoke</code> </p>
  
  <p>However, if that cannot be done I am open for any suggestions. I am experienced in C/C++, and I know I have seen a few methods for C++ but nothing that looked very promising.</p>
  
  <h2>Here is the alternative I was thinking :</h2>
  
  <p>Simply just create a different program and then just schedule the <code>.exe</code> to run when I want.</p>
  
  <ul>
  <li>As of now I am leaning heavily towards this method, but I am relatively new to programming in Visual Studio. However, I am an experienced programmer.</li>
  <li>My question on this is... what would be the preferred method of creating this program? Would it be creating a Windows Form Application or a Console Application or just a plain empty project with a <code>Main()</code> method</li>
  </ul>
  
  <p>So if you guys can shed some light on this subject for me that would be greatly appreciated.</p>