【问题标题】:Show Cron expression as text in Hangfire Dashboard in mvc core在 mvc 核心的 Hangfire 仪表板中将 Cron 表达式显示为文本
【发布时间】:2020-06-02 11:18:34
【问题描述】:

Q1- 我在 ASP.NET MVC Core 2.2 中使用了 Hangfire Dashboard,但我需要在“Recurring Job”中将 cron 表达式显示为文本。

示例:当 cron 值为 * * * * * 时,表中显示的文本为“每分钟”

       when cron value is 0 8 * * *   show text in table is "At 08:00"

等等……如附件图片所示

Q2- 我可以在 Hangfire Dashboard 代码上进行编辑,还是可以访问 Hangfire Dashboard 代码并将其编辑为 HTML?

【问题讨论】:

    标签: c# asp.net-core-mvc hangfire


    【解决方案1】:

    您可以在作为工作交给 HangFire 的方法上使用属性 [DisplayName("...")]。然后将给 DisplayName 的文本显示在 HangFire 仪表板上

    【讨论】:

      猜你喜欢
      • 2017-05-19
      • 1970-01-01
      • 2017-10-24
      • 2015-03-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-26
      相关资源
      最近更新 更多