-
When anything is injected in IJob implementation class, it.is not called Asp.net core 3.1 and
Event triggers every 10 seconds when nothing is injected to ExampleJob, but not triggers when logger is injected. Startup.cs
ExampleJob.cs
|
Beta Was this translation helpful? Give feedback.
Answered by
lahma
Sep 30, 2020
Replies: 1 comment 2 replies
-
Please follow the documentation and add the job via |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
vlapenkov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please follow the documentation and add the job via
q.AddJob...
. This will register it to DI. You should not take reference to scheduler inside the configuration while you are still building the configuration. It's especially bad now when the lambda isasync void
, it won't be evenawait
ed.