I am trying to integrate a scheduled job statement into Process.Start
Process.Start("schtasks.exe", "\"" + textBox1.Text + "\"");
How would it be possible to add the parameters below into the Process.Start statement above?
schtasks /Create /SC DAILY /TN TestJob /TR "C:\Program Files\test\test.exe 'C:\'"
You can interact with the windows task manager directly using
TaskScheduler. It will give you access to a whole range of properties of the task and under what conditions it will be fired. It, of course, require more code, but it gives you all the control that you need in a managaged manner.This is a piece of code that im using myself and it is working well (ive cut away some of my business logic so not all arguments will compile/make sense). It will basically create a task that will fire one minute from Now:
More explaination and code samples can be found here: Calling the Task Scheduler in Windows Vista (and Windows Server 2008) from managed code