static async Task Main(string[] args) { var host = new ServiceHost(); host.ConfigureContainer(b => { b.RegisterType <A>().SingleInstance(); b.RegisterType <Job>(); }); host.ConfigureQuartz(); host.OnHostStarted += async p => { var s = p.GetQuartz(); var ss = await s.CreateSchedulerAsync("X", true); await s.CreateJobAsync <Job>("X", "1/5 * * * * ?"); await ss.Start(); }; await host.RunAsync(); }