I am using quartz.NET in my project. I have the following problem. I want to run a Scheduled task everyday at 23 o'clock and I am using this code to do that:
public class HelloJob : IJob
{
public void Execute(IJobExecutionContext context)
{
//Download file
}
}
public interface ISchedule
{
void Run();
}
public class HelloSchedule : ISchedule
{
public void Run()
{
IJobDetail job = JobBuilder.Create<HelloJob>()
.WithIdentity("job1")
.Build();
ITrigger trigger = TriggerBuilder.Create()
.ForJob(job)
.WithIdentity("trigger1")
.StartNow()
.WithCronSchedule("0 0 23 ? * MON-FRI *")
.Build();
ISchedulerFactory sf = new StdSchedulerFactory();
IScheduler sc = sf.GetScheduler();
sc.ScheduleJob(job, trigger);
sc.Start();
}
}
but unfortunately it's not firing.
How can I know what the problem is and solve it?
Thanks for your advice