Repository navigation
v1.1.0
Fixes and improvements after 1.0.0.
dotnet add package SharpTicker --version 1.1.0All SharpTicker.* packages share one version and are released together: update them together to 1.1.0.
Changes you may notice
These apply when you upgrade from 1.0.0. There is still no database change.
| Area | In 1.0.0 | Now | What to do |
|---|---|---|---|
| Source generator diagnostics | TQ001 to TQ011 |
ST001 to ST011, same numbers and meanings |
Update NoWarn, .editorconfig severities and #pragma warning disable lines that name the old IDs. |
Cron with a backwards range, such as 22-2 |
Accepted, and run as the forward range (22-2 ran at hours 2 to 22) |
Refused when added or updated through the cron manager or the dashboard, and a compile error on an attribute | Only for crons you add or update. Crons already in your store keep running as before. Write overnight hours as two ranges, 22-23,0-2. |
| Updating a ticker that does not exist | The in-memory, MongoDB and Redis stores created it, or reported success without changing anything; EF Core failed | Fails on every store with a TickerValidatorException and creates nothing |
Only if you relied on an update creating a ticker. Use AddAsync. |
A job that throws OperationCanceledException after its own cancellation |
Recorded as Failed and retried, unless it was a TaskCanceledException |
Recorded as Cancelled |
Only if you counted on such a job being retried. A timeout inside the job is still a failure. |
A request timeout of HttpClient inside a job |
A TaskCanceledException, so recorded as Cancelled and not retried |
Recorded as Failed, retried as configured, and passed to HandleExceptionAsync |
Only if you counted on such a job ending as Cancelled. A job cancelled by the cancel button, RequestCancellation or the application stopping is still Cancelled. A child with OnFailure now runs after a timeout. |
| Stopping the application while jobs run | The scheduler did not wait. Even a job that honors its token could not record that it was cancelled, and stayed InProgress |
The scheduler waits for the running jobs for a little less than the host's shutdown timeout (HostOptions.ShutdownTimeout, 30 seconds by default), then records the ones still running as Cancelled with their lock released. A warning names them |
A job that ignores its CancellationToken now delays the stop by the whole wait, so pass the token on. If your jobs need longer to wind down, raise the shutdown timeout of the host, and on Kubernetes the termination grace period with it. |
Package dependencies of SharpTicker |
Microsoft.Extensions.Hosting.Abstractions |
Also Microsoft.Extensions.Hosting, to read the host's shutdown timeout |
Nothing, an application that runs a host has it. The dependencies of the other SharpTicker.* packages are unchanged. |
Fixed
- A job added to run at once was tied to the request that added it. When the request ended the job was cancelled, or dropped and left
InProgress, and it could run with an empty request. - A cancelled job could not record
Cancelledon EF Core, and stayedInProgress. - On EF Core, a result that did not mark the status reset it to
Idle, and a cron occurrence update did not refreshUpdatedAt. - The dashboard showed a refused add or update as done. It now keeps the dialog open and shows the reason.
- Retry intervals set in the dashboard were not saved.
- The next occurrence read 0001-01-01 until the scheduler had planned one.
- The dashboard's machine jobs query failed for a locked job without a lock holder, and its hub threw for a connection without a user name.
- Running a cron that does not exist stored an orphan occurrence; it answers 404 now.
- A job that blocks its worker thread and ends after the scheduler was disposed ended the process with an
ObjectDisposedException. - When the last workers left together, a job queued at that moment could wait with no worker until the next job was queued.
- A worker thread that could not be started kept its slot for good, and ended the process when a leaving worker tried to replace itself.
- A new worker could take the id of a worker that was still running, so two workers shared a queue.
- The EF Core store no longer logs EF Core's "more than one collection" warning on a normal start.
- A cron expression in the dashboard form is checked by the server's rules.
- A job that was running when the application stopped stayed
InProgress, even when it honored cancellation, because the host disposed its services before the job could record its result. - Removing a time ticker with the EF Core store left its children and grandchildren behind, without a parent and without an execution time. They are removed with it now, as the in-memory store always did. If you removed chained jobs before this version, you may see rows in the Time Tickers list that have no execution time: they are what was left behind, they never run, and you can delete them from the dashboard.
Added
- Month and day names in cron expressions (
MON-FRI,Jan,Jul), checked at build time by the same rules as at run time. - Run again in the Time Tickers list.
- Dashboard layout for wide screens and phones, and readable status charts.
- Dashboard warnings and errors are logged on the server.
- The scheduler, the dispatcher and the EF Core startup release log what they used to swallow: unhandled job exceptions, a failed worker thread start, jobs dropped when the scheduler is disposed or dispatched while the application stops, and a failed release at startup. See Scheduler log entries in the production guide.
Please report problems in Issues.
What's Changed
- Publish documentation to GitHub Pages with DocFX by @msx752 in #16
- Point install instructions at the stable 1.0.0 release by @msx752 in #15
- Add a sidebar and brand colors to the documentation site by @msx752 in #17
- Redirect the old documentation URLs to /guide/ by @msx752 in #18
- Fixes and improvements after 1.0.0 by @msx752 in #27
Full Changelog: v1.0.0...v1.1.0