Hangfire With Orcale (configuration)

PHOTO EMBED

Thu Dec 07 2023 07:33:33 GMT+0000 (Coordinated Universal Time)

Saved by @Samarmhamed78

services.AddHangfire(x => x.UseStorage(
             new OracleStorage(
             Configuration.GetConnectionString("ConnectionString"),
             new OracleStorageOptions
             {
                 TransactionIsolationLevel = System.Data.IsolationLevel.ReadCommitted,
                 QueuePollInterval = TimeSpan.FromSeconds(15),
                 JobExpirationCheckInterval = TimeSpan.FromHours(1),
                 CountersAggregateInterval = TimeSpan.FromMinutes(5),
                 PrepareSchemaIfNecessary = true,
                 DashboardJobListLimit = 50000,
                 TransactionTimeout = TimeSpan.FromMinutes(1),
                 SchemaName = appSettings.DatabaseSchema
             })
            ));
            services.AddHangfireServer();
----------------------------------------------------------
  app.UseHangfireDashboard("/hangfiredash", new DashboardOptions
            {
                DashboardTitle = "Sample Jobs",
                Authorization = new[]
            {
                new  HangfireAuthorizationFilter("admin")
            }
            });
--------------------------------Cron Expression--------------------------
https://crontab.guru/#00_01_*/01_*_*
content_copyCOPY