NCronJob-Dev / NCronJob

A Job Scheduler sitting on top of IHostedService in dotnet.
https://docs.ncronjob.dev/
MIT License
153 stars 11 forks source link

[doc] Feature request: Maybe slightly enhance the conccurency documentation? #99

Open nulltoken opened 2 days ago

nulltoken commented 2 days ago

Just a random thought. Concurrency may happen when running multiple times the same job on one instance. It may also happen would the host application be deployed in a web farm.

Designing this sort of jobs properly may require some experience prior painful production burn scars.

I wonder if an example (or a high level pseudo code) may help the reader understand what should be to be taken care of.

For instance, given a process feeding a database with things to process in a state A, how to safely design a job that could process those things and bring them to a state B in a conccurently-aware way:

linkdotnet commented 2 days ago

More documentation can't really hurt. The current state somewhat convers all the features but doesn't give a guideline on how to reach certain things. Exactly like you explained.

I am all in if you have concrete ideas/examples.

If you want, you can easily play around with the documentation without any setup. We have devcontainer support and predefined tasks for serving the docs.