View on GitHub
Clean Architecture Toolkit for .NET
Clean Architecture Toolkit is a clean, modular architecture foundation for .NET applications.
It embraces SOLID principles and focuses on maintainability, testability, and scalability through clear boundaries and pluggable design.

|   HOME   |   MODULE OVERVIEW   |   DEMO   |

Plans for Cat.Scheduling

Worker support that turns schedules into service requests.
Status: not started. This plan collects what we know. The open questions need an answer before the build.

Contents

The idea

Some work starts because time passed, not because someone asked. A nightly cleanup, a periodic import, an order that stays unpaid for 24 hours. The service project structure has a place for it: the optional ServiceName.Scheduler project.

Cat.Scheduling is the code behind that project. It runs on a schedule. Every run becomes a service request that the core handles. The worker holds no business logic.

What we already know

From the root readme:

From the demo plan:

From the saga plan:

From the architecture:

Decisions and open questions

Decided

Topic Decision
Hosting A worker that runs inside the API of the service.
Work One run becomes one service request.
Business logic None in the worker.
Time zone The demo counter cleanup uses UTC.
Testing A development endpoint triggers a run, in debug mode only.

Open

Questions before building

  1. Do we want recurring jobs only in the first version, or also one-off timeouts?
  2. Where do schedules live: in code, in appsettings or in the database?
  3. Which scheduling library, if any, do we build on?
  4. How do we stop two instances from running the same job? What do we run in Container Apps?
  5. What should happen after a missed run or a failed run?
  6. Is run history something the module must store? If yes, where, and how does it connect to the notifications data decision?
  7. Which time zones must we support besides UTC?
  8. Which user identity does a scheduled service request get?
  9. Should jobs be configurable per environment, for example switched off in development?
  10. Do we build the timeout part together with Cat.Sagas, or first?