My requeriment is to build a Quartz.net Task that:
- Runs at specified time for a variable amount of minutes and then finish?
I have this class:
public class Proccess
{
public static void Start()
{
Console.WriteLine("I'm starting");
}
public static void End()
{
Console.WriteLine("I'm finishing");
}
}
Is there any way to configure a job with Quartz.Net to call Process.Start() wait for X minutes and the call Process.End() ?
Maybe somethings like this?
public class TapWaterJob : IJob
{
public TapWaterJob()
{
// quartz requires a public empty constructor so that the
// scheduler can instantiate the class whenever it needs.
}
public void Execute(IJobExecutionContext context)
{
Proccess.Start();
System.Threading.Thread.Sleep(10000);
Process.End();
}
}