在mvc core的Hangfire Dashboard中以文本形式显示Cron表达式。

问题描述 投票:0回答:1

Q1- 我在MVC core 2.2中使用了Hangfire Dashboard,但我需要在 "Recurring Job "中显示cron表达式为Text。

例如:当cron值为* * * * *时,表中显示的文字是 "每分钟"

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

以此类推......如附图所示。

Q2-我可以在hangfire Dashboard代码上进行编辑,或者我可以访问hangfire dashboard代码并将其编辑为HTML?

enter image description here

c# asp.net-mvc model-view-controller core hangfire
1个回答
0
投票

你可以使用属性[DisplayName("...")]的方法,你交给HangFire作为你的工作。给予DisplayName的文字就会显示在HangFire仪表板上。

© www.soinside.com 2019 - 2024. All rights reserved.