ModernUO/Projects/Server/Utilities
Kamron Batman 78feea86b4
feat: Adds scheduler with wallclock timer (#2163)
### Summary

* Adds an event scheduler.
* Adds conveniences for hourly, daily, weekly, biweekly, monthly, ordinal monthly, and yearly recurrences

Example:

```cs
var tz = TimeZoneInfo.FindSystemTimeZoneById("America/New_York");

// Specify the time of the day, and the day of the week you want it to occur. Make sure it is translated into Utc.
// The next occurrence will be _after_ the specified date/time.
var scheduledEvent = EventScheduler.WeeklyAt(new DateTime(2025, 04, 26, 17, 00, 00), StartEvent, tz);

void StartEvent()
{
    World.Broadcast(0x30, false, "The event has started!");
}

Console.WriteLine("Event starts on {0}", scheduledEvent.NextOccurrence);
```

In this example, on _Saturday, May 3rd, 2025 @ 5pm ET_, the message "The event has started!" will be broadcasted.
2025-04-26 22:27:08 -07:00
..
ActivatorExtensions.cs fix: Fixes duping containers and removes copying private setter properties (#1816) 2024-06-03 15:44:56 -07:00
EntityActivatorExtensions.cs fix: Consolidates Color/Center html (#1762) 2024-05-07 23:56:32 -07:00
HashUtility.cs feat: Updates to .NET 9 (#1984) 2024-12-08 10:16:34 -08:00
Html.cs feat: Adds convenience methods to GumpStringsBuilder (#2124) 2025-02-13 19:58:46 -08:00
PathUtility.cs fix: Fixes directory copying (#1668) 2024-02-09 23:25:20 -08:00
Utility.cs feat: Adds scheduler with wallclock timer (#2163) 2025-04-26 22:27:08 -07:00