// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Error"); } var scheduler = DemoScheduler.Create().Result; app.UseStaticFiles(); app.UseRouting(); app.UseAuthorization(); app.UseQuartzmin(new QuartzminOptions() { Scheduler = scheduler, VirtualPathRoot = "/", UseLocalTime = true, DefaultDateFormat = "yyyy-MM-dd", DefaultTimeFormat = "HH:mm:ss \"GMT\"zzz" }); app.UseEndpoints(endpoints => { endpoints.MapDefaultControllerRoute(); endpoints.MapRazorPages(); }); }
public void Configure(IApplicationBuilder app) { app.UseQuartzmin(new QuartzminOptions() { Scheduler = DemoScheduler.Create().Result, }); }
public void Configure(IApplicationBuilder app) { app.UseQuartzmin(new QuartzminOptions() { UseLocalTime = true, Scheduler = DemoScheduler.Create().Result, VirtualPathRoot = "/test", }); }
public void Configuration(IAppBuilder app) { app.UseQuartzmin(new QuartzminOptions() { Scheduler = DemoScheduler.Create().Result, DefaultDateFormat = "dd.MM.yyyy", VirtualPathRoot = "/test", }); }
static void Main(string[] args) { var scheduler = DemoScheduler.Create().Result; scheduler.Start(); while (!scheduler.IsShutdown) { Thread.Sleep(500); } }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Error"); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseSpaStaticFiles(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller}/{action=Index}/{id?}"); }); app.UseSpa(spa => { // To learn more about options for serving an Angular SPA from ASP.NET Core, // see https://go.microsoft.com/fwlink/?linkid=864501 spa.Options.SourcePath = "ClientApp"; if (env.IsDevelopment()) { //spa.UseAngularCliServer(npmScript: "start"); } }); app.UseQuartzmin(new QuartzminOptions() { Scheduler = DemoScheduler.Create().Result, }); }
public static void Main(string[] args) { var scheduler = DemoScheduler.Create().Result; var host = WebHost.CreateDefaultBuilder(args).Configure(app => { app.UseQuartzmin(new QuartzminOptions() { Scheduler = scheduler }); }).ConfigureServices(services => { services.AddQuartzmin(); }) .Build(); host.Start(); while (!scheduler.IsShutdown) { Thread.Sleep(250); } }
void CreateScheduler() { scheduler = DemoScheduler.Create(start: false).Result; }