-
Notifications
You must be signed in to change notification settings - Fork 70
Description
我们不希望在web端执行后台任务,有单独的windowsservice程序执行,
是不是直接在web客户端配置以下代码就行了
//使用redis config.UseRedisStorage(Redis, new Hangfire.Redis.RedisStorageOptions() { FetchTimeout = TimeSpan.FromMinutes(5), Prefix = "{hangfire}:", //活动服务器超时时间 InvisibilityTimeout = TimeSpan.FromHours(1), //任务过期检查频率 ExpiryCheckInterval = TimeSpan.FromHours(1), DeletedListSize = 10000, SucceededListSize = 10000 }) .UseHangfireHttpJob(new HangfireHttpJobOptions() { AddHttpJobButtonName = "添加计划任务", AddRecurringJobHttpJobButtonName = "添加定时任务", EditRecurringJobButtonName = "编辑定时任务", PauseJobButtonName = "暂停或开始", DashboardTitle = "XXX公司任务管理", DashboardName = "后台任务管理", DashboardFooter = "XXX公司后台任务管理V1.0.0.0" }) .UseConsole(new ConsoleOptions() { BackgroundColor = "#000079" }) .UseDashboardMetric(DashboardMetrics.AwaitingCount) .UseDashboardMetric(DashboardMetrics.ProcessingCount) .UseDashboardMetric(DashboardMetrics.RecurringJobCount) .UseDashboardMetric(DashboardMetrics.RetriesCount) .UseDashboardMetric(DashboardMetrics.FailedCount) .UseDashboardMetric(DashboardMetrics.ServerCount);
服务器端需要配置什么吗?除UseHangfireServer等基本配置外