-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Infer second precision in cron expressions
- Loading branch information
1 parent
5e69c40
commit d81d78f
Showing
10 changed files
with
62 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# v3 Migration Guide | ||
|
||
This document will describe the changes made in `v3` of **NCronJob** and how to migrate from `v2`. | ||
|
||
Version 3 of **NCronJob** brings some breaking changes to mae a better API. | ||
|
||
### Second precision is automatically inferred | ||
In `v2` one would define as such: | ||
```csharp | ||
builder.Services.AddNCronJob( | ||
n => n.AddJob<SimpleJob>( | ||
p => p.WithCronExpression("* * * * * *", true))); | ||
``` | ||
|
||
Inside `WithCronExpression` was an optional parameter that if set to `true` the cron expression has to be in seconds precision. This was a bit confusing and not very intuitive. In `v3` the seconds precision is automatically inferred. So the above code can be simplified to: | ||
|
||
```csharp | ||
builder.Services.AddNCronJob( | ||
n => n.AddJob<SimpleJob>( | ||
p => p.WithCronExpression("* * * * * *"))); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters