You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-MinimalAPIfor instant jobs and job dependencies. By [@linkdotnet](https://github.com/linkdotnet).
22
+
```csharp
23
+
public void MyOtherMethod() =>jobRegistry.RunInstantJob((MyOtherServiceservice) =>service.Do());
24
+
```
12
25
13
26
### Changed
14
27
-Replace `Microsoft.Extensions.Hosting` with `Microsoft.Extensions.Hosting.Abstractions` for better compatibility. Reported by [@chrisls121](https://github.com/chrisls121) in [#74](https://github.com/NCronJob-Dev/NCronJob/issues/74). Implemented by [@linkdotnet](https://github.com/linkdotnet).
Copy file name to clipboardExpand all lines: docs/features/model-dependencies.md
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Services.AddNCronJob(options =>
16
16
Both `success` and `faulted` are optional so that you can define only one of them if needed. `RunJob` can be chained to allow multiple jobs to run after the completion of the main job.
17
17
18
18
This allows very complex job dependencies to be defined in a simple and readable way.
19
-

19
+

20
20
21
21
### Passing parameters to dependent jobs
22
22
The `RunJob` method allows optional parameters to be passed to the dependent job.
/// Runs an instant job, which gets directly executed.
30
30
/// </summary>
31
31
/// <remarks>
32
-
/// The <paramref name="jobAction"/> delegate supports, like <see cref="ServiceCollectionExtensions.AddNCronJob"/>, that services can be retrieved dynamically.
32
+
/// The <paramref name="jobDelegate"/> delegate supports, like <see cref="ServiceCollectionExtensions.AddNCronJob"/>, that services can be retrieved dynamically.
33
33
/// Also the <see cref="CancellationToken"/> can be retrieved in this way.
34
34
/// </remarks>
35
-
/// <param name="jobAction">The delegate to execute.</param>
36
-
voidRunInstantJob(DelegatejobAction);
35
+
/// <param name="jobDelegate">The delegate to execute.</param>
36
+
voidRunInstantJob(DelegatejobDelegate);
37
37
38
38
/// <summary>
39
39
/// Runs a job that will be executed after the given <paramref name="delay"/>.
/// Runs a job that will be executed after the given <paramref name="delay"/>.
49
49
/// </summary>
50
-
/// <param name="jobAction">The delegate to execute.</param>
50
+
/// <param name="jobDelegate">The delegate to execute.</param>
51
51
/// <param name="delay">The delay until the job will be executed.</param>
52
52
/// <remarks>
53
-
/// The <paramref name="jobAction"/> delegate supports, like <see cref="ServiceCollectionExtensions.AddNCronJob"/>, that services can be retrieved dynamically.
53
+
/// The <paramref name="jobDelegate"/> delegate supports, like <see cref="ServiceCollectionExtensions.AddNCronJob"/>, that services can be retrieved dynamically.
54
54
/// Also the <see cref="CancellationToken"/> can be retrieved in this way.
/// Runs a job that will be executed at the given <paramref name="startDate"/>.
69
69
/// </summary>
70
-
/// <param name="jobAction">The delegate to execute.</param>
70
+
/// <param name="jobDelegate">The delegate to execute.</param>
71
71
/// <param name="startDate">The starting point when the job will be executed.</param>
72
72
/// <remarks>
73
-
/// The <paramref name="jobAction"/> delegate supports, like <see cref="ServiceCollectionExtensions.AddNCronJob"/>, that services can be retrieved dynamically.
73
+
/// The <paramref name="jobDelegate"/> delegate supports, like <see cref="ServiceCollectionExtensions.AddNCronJob"/>, that services can be retrieved dynamically.
74
74
/// Also the <see cref="CancellationToken"/> can be retrieved in this way.
0 commit comments