I am developing a greenfield project which has two requirements.
- To be ran in the cloud (Azure).
- To be ran on a self hosted Windows Server installation.
This project is broken into 3 main parts.
- A collection of clients.
- A RESTful server.
- Persistent Storage.
For this question the clients are irrelevant, the RESTful server is built with ASP.NET WebApi (satisfying the requirements above) and the persistent storage is Azure Tables in case of the cloud or RavenDb when self hosted. And so to the question.
What is the best mechanism for scheduling jobs in this architecture that satisfies both requirements listed above.
I have a concept of jobs which are ran by querying the RESTful server and asking it to do a scheduled time check on any active jobs so the service really only needs to make a very simple rest query to start the process.
All the jobs and the logic to run them (They are templates) is on the server so no logic is required by the service.
Ultimately the best response would be some sort of ticker service that asks the service to preform the check. If I could build this directly into the ASP.NET WebApi server I would be even happier. It is a new tech to use so please excuse any glaring oversights I may have missed that would resolve this question.