TickerNet docs Sponsored by Omniscient AI

TickerNet · coming from TickerQ

Migrating from TickerQ

TickerNet is TickerQ's code as of commit 3acd0f31 with every TickerQ name changed to TickerNet. Your data carries over: table, collection and key names are the same. Your code needs new package references and namespaces, and a few names your monitoring or proxy may depend on have changed.

On this page
  1. Before you start
  2. Packages
  3. Namespaces and API
  4. Source generator and diagnostics
  5. Stored and external names
  6. EF Core migrations
  7. Coming from TickerQ Hub
  8. Checklist
→

Before you start

  • Which TickerQ. This guide is for TickerQ 10.4.x and earlier open-source releases. It was checked against the TickerQ code at the fork point, commit 3acd0f31, which is four commits after the 10.4.0 package.
  • .NET 10 or later first. TickerNet targets .NET 10 and .NET 11 (ADR 0012). If you are on a TickerQ 8.x or 9.x release for .NET 8 or 9, move your app to .NET 10 or 11 first (ADR 0006).
  • Packages. TickerNet's packages are on nuget.org. Getting started shows how to add them.
  • One behaviour change: jobs started at once outlive the call that added them. When a job is dispatched straight away, for example a time job added with AddAsync or AddBatchAsync for now or the next second, or a cron run started from the dashboard, it no longer runs with the CancellationToken you passed to that call. It runs with the host's stopping token. In TickerQ, cancelling that token, for example by the end of the HTTP request that added the job, could cancel the job or leave it InProgress. To cancel one job, use TickerCancellationTokenManager.RequestTickerCancellationById.
  • TickerQ Hub. TickerQ Hub, a hosted service with its own terms, isn't supported (ADR 0005). If you ran jobs on remote workers with TickerQ.RemoteExecutor and TickerQ.SDK, TickerNet does it without a hosted service: TickerNet.Hub in the scheduler and TickerNet.Worker in the workers. Jobs stored as function@node keep working. See section 06 and Remote workers.
TickerQ 10.5.0 and later are a different product. They are released under a commercial license, as are the matching 8.5.0, 9.5.0 and 11.5.0 builds. Nothing from those versions is in TickerNet, and features added there do not exist here. This guide does not cover them; Compared with TickerQ sets the two side by side.

If you are on 10.4.0, you also pick up the four TickerQ commits that came after it and before the fork: ActivitySource tracing built into the core packages (EnableActivitySource()), OpenTelemetry packages at 1.15.3 or later, a change to how the dashboard sends cron runs over SignalR, and the new MongoDB store.

01

Packages

Each TickerQ package has a TickerNet package of the same shape, except the two remote-execution packages, which have replacements. All share one version, starting at 1.0.0.

TickerQ packageTickerNet packageNotes
TickerQTickerNetCarries the source generator, as before.
TickerQ.UtilitiesTickerNet.Utilities
TickerQ.EntityFrameworkCoreTickerNet.EntityFrameworkCore
TickerQ.Caching.StackExchangeRedisTickerNet.Caching.StackExchangeRedis
TickerQ.DashboardTickerNet.Dashboard
TickerQ.Instrumentation.OpenTelemetryTickerNet.Instrumentation.OpenTelemetry
none in 10.4.0TickerNet.MongoDBThe MongoDB store was added to TickerQ after the 10.4.0 package, at the fork point.
TickerQ.RemoteExecutorTickerNet.HubA replacement, not a rename. It goes in the scheduler, and workers connect to it directly instead of through TickerQ Hub. See section 06.
TickerQ.SDKTickerNet.WorkerA replacement, not a rename. It goes in each worker app. TickerQ's Node SDK has no counterpart.
02

Namespaces and API

The rename replaced TickerQ with TickerNet everywhere, in any letter case, and changed nothing else.

Every namespace moved: TickerQ.DependencyInjection is now TickerNet.DependencyInjection, TickerQ.Utilities.Base is now TickerNet.Utilities.Base, and so on. TickerQ.TickerQThreadPool is now TickerNet.TickerNetThreadPool. Public types and members with TickerQ in their name changed the same way:

TickerQTickerNetWhere
AddTickerQ(...), AddTickerQ<TTimeTicker, TCronTicker>(...)AddTickerNetTickerNetServiceExtensions
UseTickerQ(TickerQStartMode)UseTickerNet(TickerNetStartMode)TickerNetServiceExtensions
TickerQStartModeTickerNetStartModeTickerNet.Utilities.Enums
AddTickerQDiscovery(...)AddTickerNetDiscoveryTickerNetDiscoveryExtension
TickerQServiceExtensions, TickerQEndpointExtensions, TickerQDiscoveryExtensionTickerNetServiceExtensions, TickerNetEndpointExtensions, TickerNetDiscoveryExtensionTickerNet.DependencyInjection
TickerQDbContext, TickerQDbContext<TTimeTicker, TCronTicker>TickerNetDbContextTickerNet.EntityFrameworkCore.DbContextFactory
TickerQEfCoreOptionBuilder<,>TickerNetEfCoreOptionBuilder<,>TickerNet.EntityFrameworkCore
UseTickerQDbContext<TDbContext>(...)UseTickerNetDbContext<TDbContext>EF Core option builder
ServiceBuilder.TickerQOptionsConfiguration<,,>ServiceBuilder.TickerNetOptionsConfiguration<,,>TickerNet.EntityFrameworkCore.Customizer
TickerQMongoOptionBuilder<,>TickerNetMongoOptionBuilder<,>TickerNet.MongoDB
UseTickerQMongoClient(...)UseTickerNetMongoClientMongoDB option builder
ServiceExtension.TickerQRedisOptionBuilderServiceExtension.TickerNetRedisOptionBuilderTickerNet.Caching.StackExchangeRedis.DependencyInjection
[TickerQConstructor] (TickerQConstructorAttribute)[TickerNetConstructor]TickerNet.Utilities.Base
ITickerQHostScheduler, ITickerQTaskScheduler, ITickerQDispatcherITickerNetHostScheduler, ITickerNetTaskScheduler, ITickerNetDispatcherTickerNet.Utilities.Interfaces
TickerQTaskScheduler, IsTickerQWorkerThreadTickerNetTaskScheduler, IsTickerNetWorkerThreadTickerNet.TickerNetThreadPool
TickerQBaseLoggerInstrumentationTickerNetBaseLoggerInstrumentationTickerNet.Utilities.Instrumentation
TickerQNotificationHubTickerNetNotificationHubTickerNet.Dashboard.Hubs

Names that did not change. Anything without TickerQ in its name kept it: AddOperationalStore, AddStackExchangeRedis, AddDashboard, AddOpenTelemetryInstrumentation, EnableActivitySource, MapTicker, [TickerFunction], TickerFunctionContext, the managers, the entities and TickerHelper. Names that start with TickerQuery or contain TickerQueryable, such as ITickerQueryable, TimeTickerQueryFilter and CronTickerQueryFilter, mean "ticker query" and were left alone.

Doing it in one pass. Commit your work first, then run this from your repository root. It renames TickerQ in C#, project and JSON files and .editorconfig, leaves TickerQuery… names and EF Core migration IDs alone, and changes TQ0nn diagnostic IDs to TN0nn. Review the diff before you commit it.

shellone-pass rename, needs git and perl
git grep -lz -e TickerQ -e 'TQ0[0-9][0-9]' -- '*.cs' '*.csproj' '*.props' '*.json' '.editorconfig' \
  | xargs -0 perl -pi -e 'next if /\[Migration\(/; s/TickerQ(?!uer)/TickerNet/g; s/\bTQ0(\d\d)\b/TN0$1/g'

It does not touch lower-case strings such as "tickerq" or "/tickerq/dashboard"; section 04 lists those. It also leaves TickerQ's version numbers on package references, so swap those for TickerNet project references.

03

Source generator and diagnostics

Diagnostic IDs moved from TQ to TN. Numbers, meanings and severities are the same.

TickerQTickerNetSeverityMeaning
TQ001TN001ErrorClass must be public or internal to hold [TickerFunction] methods.
TQ002TN002ErrorMethod must be public or internal.
TQ003TN003ErrorInvalid cron expression.
TQ004TN004ErrorMissing function name.
TQ005TN005ErrorDuplicate function name.
TQ006TN006WarningSeveral constructors; the first is used unless one has [TickerNetConstructor].
TQ007TN007ErrorAbstract class contains [TickerFunction] methods.
TQ008TN008ErrorNested class contains [TickerFunction] methods.
TQ009TN009ErrorInvalid parameter. Only TickerFunctionContext, TickerFunctionContext<T> and CancellationToken are allowed.
TQ010TN010ErrorMore than one constructor has [TickerNetConstructor].
TQ011TN011ErrormaxConcurrency is below 0 (0 means no limit).
  • Update #pragma warning disable TQ006, <NoWarn> entries and dotnet_diagnostic.TQ006.severity lines in .editorconfig. The diagnostic category changed from TickerQ.SourceGenerator to TickerNet.SourceGenerator.
  • The generated class in your root namespace is now TickerNetInstanceFactoryExtensions (was TickerQInstanceFactoryExtensions), in TickerNetInstanceFactory.g.cs. Update any call to its Initialize() method, as in samples/TickerNet.Sample.WorkerService. The generated TickerFunctions class kept its name.
04

Stored and external names

Checked by comparing the code at 3acd0f31 with main. Anything with "tickerq" in it, in any case, changed; nothing else did. For the dashboard address and its saved sign-ins, TickerNet still accepts the old names on its own; for trace names, it can on request.

Changed

NameTickerQTickerNetWhat to do
Redis InstanceName default: the prefix for node heartbeats (hb:{node}), the node list (nodes:registry) and the cron expression cache (cron:expressions)tickerq:tickernet:Upgrade every node at once: a TickerQ node and a TickerNet node don't see each other's heartbeats. To keep the old prefix, set InstanceName = "tickerq:" in AddStackExchangeRedis. Old heartbeat and node-list keys expire on their own; tickerq:cron:expressions has no expiry, so delete it by hand.
DI key for the Redis IConnectionMultiplexer, IDatabase and IDistributedCache"tickerq""tickernet"Change any [FromKeyedServices("tickerq")] or GetRequiredKeyedService(..., "tickerq") in your code.
Dashboard default path/tickerq/dashboard/tickernet/dashboardNothing for links and bookmarks: GET and HEAD requests to /tickerq/dashboard and anything under it get a temporary redirect (302) to the same page under the dashboard's base path, with the query string kept. Turn this off with DisableTickerQPathRedirect() in AddDashboard. Proxy and access rules still need the new path, or keep the old path with SetBasePath("/tickerq/dashboard").
Dashboard config scripts__tickerq-config.js, __tickerq-preload.js__tickernet-config.js, __tickernet-preload.jsUpdate proxy rules or content security policies that name them.
Dashboard browser globalwindow.TickerQConfigwindow.TickerNetConfigOnly matters if you changed the dashboard's web app.
Dashboard browser storage keystickerq_basic_auth, tickerq_api_key, tickerq_host_access_key, tickerq_bearer_token, tickerq:dashboard:timezonetickernet_basic_auth, tickernet_api_key, tickernet_host_access_key, tickernet_bearer_token, tickernet:dashboard:timezoneNothing. When the dashboard opens, it copies each old key to its new name (only if the new key isn't set yet) and removes the old key, so users stay signed in and keep their chosen time zone.
Dashboard CORS policy nameTickerQ_Dashboard_CORSTickerNet_Dashboard_CORSOnly matters if your code refers to the policy.
Dashboard OpenAPI tagTickerQ DashboardTickerNet DashboardUpdate OpenAPI filters that use it.
ActivitySource nameTickerQTickerNetChange AddSource("TickerQ") to AddTickerNetSource() (the same as AddSource("TickerNet")). The instrumentation scope reported to your tracing backend is TickerNet either way, so filters on the scope name need to change.
Span namestickerq.job.execute.*, tickerq.job.enqueued and the other tickerq.job.* and tickerq.seeding.* spans, tickerq.job_request_serialization.failedThe same with tickernet. in frontUpdate trace queries, dashboards and alerts, or keep the old names: with the TickerNet.Instrumentation.OpenTelemetry package, call AddTickerNetSource(useTickerQNames: true) on the tracer provider, before any exporter. Spans are then exported as tickerq.*. Off by default.
Span tagstickerq.job.id, tickerq.job.function, tickerq.job.type and the other tickerq.* tagstickernet.job.id, tickernet.job.function, tickernet.job.type, …Same as span names: AddTickerNetSource(useTickerQNames: true) exports them as tickerq.*.
Log messagesTickerQ Job enqueued: …, TickerQ Job completed: … and the restTickerNet Job enqueued: …, TickerNet Job completed: …, …Update log searches and alerts that match on the text.
Logger categoriesTickerQ.*TickerNet.*Change Logging:LogLevel:TickerQ to Logging:LogLevel:TickerNet.
Worker thread namesTickerQ.Worker-{n}TickerNet.Worker-{n}Seen only in debuggers and profilers.

Unchanged

NameValue in both
EF Core schema and tablesSchema ticker; tables TimeTickers, CronTickers and CronTickerOccurrences, with the same columns, keys and index names (for example IX_TimeTicker_Status_ExecutionTime and UQ_CronTickerId_ExecutionTime).
MongoDB collectionsPrefix ticker_: ticker_TimeTickers, ticker_CronTickers, ticker_CronTickerOccurrences, with the same index names. The database name is whatever you pass; the package README's example changed from tickerq to tickernet, so keep your own value.
Redis store keysPrefix tq: tq:tt:{id}, tq:tt:ids, tq:tt:pending, tq:cron:{id}, tq:cron:ids, tq:cron:{id}:occurrences, tq:co:{id}, tq:co:ids, tq:co:pending. These are written straight to the database, not under InstanceName.
Request payloadsUTF-8 JSON bytes, GZip-compressed if you turned that on.
Seeded cron jobsInitIdentifier values MemoryTicker_Seeded_{function}, so cron jobs from [TickerFunction] are matched, not duplicated.
Function namesYour own strings, so stored jobs still find their functions.
Dashboard API and sign-inHTTP API under api/, SignalR hub at ticker-notification-hub, credentials in the Authorization header (Basic or Bearer) or the access_token query value. No cookies.
ConfigurationTickerNet reads no configuration section of its own. Cron placeholders such as %Jobs:Cron% use the keys you chose.
MetricsThere is no Meter in either code base.
05

EF Core migrations

The database needs no change. Your migration files do.

Migrations you generated with TickerQ refer to TickerQ.EntityFrameworkCore.DbContextFactory, typeof(TickerQDbContext) and, in the model snapshot, entity names such as "TickerQ.Utilities.Entities.TimeTickerEntity". Rename those to TickerNet so the files compile and the snapshot matches the new model. The one-pass command in section 02 does this.

Leave every migration ID in [Migration("…")] as it is, even if it says TickerQ. EF Core records applied migrations by ID in __EFMigrationsHistory. A changed ID looks like a new migration, and applying it would try to create tables that already exist.

To check, add a throwaway migration. If its Up() and Down() are empty, the model matches the database and you can remove it. If not, read it before you apply anything.

shellcheck that nothing changed
dotnet ef migrations add CheckTickerNetRename
# Inspect the new file: Up() and Down() should have no operations.
dotnet ef migrations remove
06

Coming from TickerQ Hub

Only if you ran jobs on remote workers with TickerQ.RemoteExecutor and TickerQ.SDK.

TickerNet has no hosted hub: the scheduler is the hub. Remote workers covers set-up and behaviour in full, and ADR 0009 records the design.

  • Scheduler. Replace TickerQ.RemoteExecutor with TickerNet.Hub: call AddTickerNetHub with a shared secret inside AddTickerNet, and app.MapTickerNetHub(). The scheduler must accept HTTP/2.
  • Workers. Replace TickerQ.SDK with TickerNet.Worker: call AddTickerNetWorker with the scheduler's address, the same shared secret and a node name. Workers connect to the scheduler, not to TickerQ Hub, and need no hub API key. TickerQ.SDK can't connect to a TickerNet scheduler.
  • Use the same node names. Stored jobs named function@node run on the TickerNet worker whose node name matches, with the same spelling.
  • Data. No change: the function@node naming rule and the IsSystemPaused cron column work as before.
  • Code. SdkOfflineSkipException still works but is obsolete; use WorkerOfflineException. The TickerFunctionProvider hooks are kept.
  • Behaviour. The scheduler, not the worker, now runs retries and records every status. Logs from a function stay in the worker's own logging; they aren't forwarded to the dashboard.
↓

Checklist

  • Your app runs on .NET 10 or .NET 11.
  • TickerQ package references are replaced with the matching TickerNet packages.
  • Namespaces, types and members are renamed, with TickerQuery… names and migration IDs left alone.
  • TQ0nn suppressions and severities now say TN0nn.
  • EF Core migration files compile, and a check migration comes out empty.
  • Redis: you chose to keep or change the InstanceName prefix, and changed any "tickerq" keyed-service lookups.
  • Dashboard: proxy and access rules use the new path, or you set the old one. Old links redirect on their own.
  • Tracing listens to TickerNet with AddTickerNetSource(). Trace queries and alerts use the new names, or you turned on useTickerQNames: true. Log searches and log levels use the new names.
  • If you used TickerQ Hub: the scheduler uses TickerNet.Hub, workers use TickerNet.Worker with the same node names and the shared secret, and SdkOfflineSkipException is replaced with WorkerOfflineException.
  • Code that cancelled a just-added job through the token passed to AddAsync now uses TickerCancellationTokenManager.RequestTickerCancellationById.
  • All nodes are upgraded in the same deployment.