With the work that I've done on my Seq apps (specifically Event Timeout and Event Threshold), I've managed to build quite a robust and versatile date and time system which can be set for some complex scenarios. The properties built into these apps are extensive, with an ability to set start and end times, days of week, day of month (using versatile date expressions), and automatic public holiday calculation and behaviour using the Abstract API Holidays API. And, of course - repeating timeouts (for Event Timeout ... Event Threshold inherently needs to repeat its intervals, dependent on how you configure it).
The net effect is not dissimilar from Cron expressions, but possibly a bit more accessible within the context of the Seq app settings page.
These are apps that, essentially, monitor an event stream and then output a configured event to the stream. You use this to fire off alerts or actions using another Seq App, like Seq.App.OpsGenie, Seq.App.Atlassian.Jira, or Seq.App.EmailPlus ... just a few of the apps that I use for various purposes that help us crush it with critical SLAs!
So once you've built the groundwork for powerful scheduling, another possibility comes to mind; firing off scheduled tasks from Seq, and inadvertently creating a trilogy of related apps!
Contemplating a requirement of simply scheduling a log event that can be picked up by other apps was really simple. Essentially the requirements were;
- Schedule event logs at a given start time
- Allow repeating the event log at scheduled intervals
- Inherit features from Event Timeout/Event Threshold:
- Days of Week
- Days of Month Inclusion/Exclusion (date expressions)
- Holidays API
Having an "end time" didn't make as much sense (at this stage) for the new app, so the following decisions were made;
- If the event is not repeating, "end time" is 1 hour after the "Schedule time" (the time when the log should be made). This is largely arbitrary - it could have been one minute. I can revisit this if a case is made to have an end time.
- If the event is repeating, "end time" is 24 hours after the "Schedule time". This could possibly be the basis to add end time back in later, but for at least this version, I wanted to make events repeatable over a 24 hour period based on the interval configured.
For the most part - creating this app was a matter of stripping code out, because we simply don't need to monitor logs from other apps, and we don't need to match properties in log events. If you configured an Event Schedule instance to stream incoming events, it would do nothing with those events. There doesn't appear to be a way to suppress that option in the Seq app settings page.
Having common features across three Seq apps makes it likely that I'll move to a common library for the shared features, but I firstly wanted to get Event Threshold, and then Event Schedule, off the ground and working.
Overall, this was probably the simplest app to create, but one which will power a few key needs in our environment - like simply creating Jira tasks in specific projects on specific days of the month. There are automation options within Jira that can do this, dependent on what you have available for use, but this approach means that we can also see logs of the issues being created, and integrate it within our monitoring and alerting approach.
The configuration for Event Schedule should be quite familiar if you've used Event Timeout or Event Threshold, albeit somewhat shorter given the reduction in settings as a result of not monitoring events.
As you might expect, it's not hard for this app to work as intended - there's a fairly low bar that it has to meet, and it simply depends on how you've configured your time/weekday/date expression/public holidays.
But as a bonus, here's a sneak peek of how it will look when sent via Seq.App.Atlassian.Jira with changes that I've contributed to the project (leveraging the work on, and features of, Seq.App.OpsGenie)!
The result above is a result of the template that was set, but it should give a good idea of how powerful Event Schedule could be.
Get Event Schedule for Seq!
The moment I know you've been waiting for. You can install Event Schedule to your Seq instance using the Seq.App.EventSchedule Nuget tag, or use the most fancy links in the universe below!