Ho to schedule events for years

Our application handle of business contracts.
This contract last several years 3 or 5.

Now we like to have some notification some time before that date say 1 month before (let say to send email to admin user and populate the view of todo list for renewal) and when the date arrives the contract a should be marked as expired so change the aggregate state.

Now is the sagas with event scheduler the right choice?
Or I'm on wrong path?


If it’s only for triggering an action, I would try to avoid Sagas. They will do the trick, but they also add more complexity than this task seems to ask for.

You can use the EventScheduler from any component. It doesn’t need to be a Saga.
So what you could do is create a singleton Event Handler class that schedules events in the far future, but also listens to the events published by the scheduler and sends the appropriate commands.

If the scheduling involves more process logic, then a Saga may be a viable option.



Wow, great I didn't know.
Sure I'll do like this.

Thank for quick reply.