Hangfire (events)

Hangfire framework is used to create, process and manage background tasks and events (e.g. automatically archive expired files, send out notifications, process expiry reminders, etc).

The Hangfire dashboard resides in the Developer section (therefore only available to Brand Toolbox Developers). However, the dates and times that an event is scheduled to be triggered can be adjusted by an Administrator in the Settings section.

To change the event trigger date/time:

  1. Select ContentSettings (node) > Hangfire (tab).
  2. Enter a new Cron^ value in the corresponding field:

    Hangfire events settings

  3. Save and publish’ after making the change.

^ The Cron expression is a common format to schedule jobs to run periodically at fixed times, dates or intervals. It appears in the following format:

* * * * *

corresponding to:

minute hourday of the month,  month,  day of the week

e.g.
  Cron definitions


* = every

Therefore, the following Cron format will run at 1am every morning:

0 1 * * * 

The following Cron format will run at 12am in the morning (midnight) on the third day of every month:

0 0 3 * *

To DISABLE a Hangfire event, enter an invalid Cron format (e.g. there is no 31 April):

0 0 31 4 *

Wikipedia: https://en.wikipedia.org/wiki/Cron or Cronitorhttps://crontab.guru

Hangfire dashboard task names

The following Hangfire groups on the Settings > Hangfire page correspond to the following Hangfire event task names in the Developer > Hangfire dashboard:

Hangfire group Hangfire dashboard task name

Archive Tasks

default: 0 1 * * *

(1am in the morning)

.ArchiveAllExpiredMedia

.ArchiveSharedFiles

Process Asset/Media Changes

default: 0 0 * * *

(midnight)

.ProcessMediaStatusChangeRecords

Process Asset Expiry Reminder

default: 0 1 * * *

(1am in the morning)

.ProcessAssetExpiryReminder

Send Notifications

default: 0 2 * * *

(2am in the morning)

.SendOutNotifications

.SendSharedAssetReminders

Send Member List Report

default: 0 0 3 * *

(midnight on third day of the month)

.SendOutMemberListReport

Update Sort Order

default: 0 3 * * *

(3am in the morning)

.UpdateSortOrder

 

Developer notes:
Updating the Cron trigger values in Content [section] > Settings [node] > Hangfire [tab] will update the events in the Developer [section] > Hangfire dashboard. Therefore, there is no need to restart the server.

You can manually delete all jobs in the Hangfire dashboard entirely, and then republish the Settings [node] > Hangfire [tab] to retrieve the correct events again.

Free
demo