public Task Run() { Console.WriteLine("Hello World!"); var dummy = new MyHFTest.CustomHelloWorld(); // to start the recurring test job configured in MyHFTest, a reference to this class needed! GlobalConfiguration.Configuration.UseSqlServerStorage(configuration.GetConnectionString("HangfireConnection")); using (var server = new BackgroundJobServer()) { Console.WriteLine("Hangfire Server started. Press any key to exit..."); Console.ReadKey(); } return(Task.CompletedTask); }
public static void Main(string[] args) { var dummy = new MyHFTest.CustomHelloWorld(); // to start the recurring test job configured in MyHFTest, a reference to this class needed! CreateHostBuilder(args).Build().Run(); }