/shiny:shiny-jobsfrom shiny
Background job scheduling and execution for .NET MAUI (iOS/Android native OS schedulers) and in-process jobs for plain .NET, Linux, macOS, and Blazor WASM using Shiny.Jobs
Ships in shiny. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Shiny.Jobs provides cross-platform background job scheduling and execution. On iOS and Android it uses the native OS schedulers (BGTaskScheduler / AndroidX WorkManager); on Windows it uses COM-activated background tasks. On plain .NET targets (Linux, macOS server, Blazor WASM, console, etc.) it runs an in-process managed JobManager driven by a recurring timer — jobs run only while the host process is alive; there is no OS-level scheduler on those targets. All platforms support the same constraints (network availability, charging, battery).
Blazor WASM caveat: background jobs only run while the tab is open and foregrounded. Service Worker / Periodic Background Sync cannot invoke C# because the SW has no access to the Blazor WASM runtime. For true background HTTP work on Blazor, use
Shiny.Net.Http(AddBlazorHttpTransfers).
IJobManager, IJob, JobRegistration, or related types| Item | Value |
|---|---|
| NuGet | Shiny.Jobs |
| Namespace | Shiny.Jobs (types); Shiny (registration extensions) |
| Platforms | iOS, tvOS, Android, Windows (native OS); Linux, macOS, Blazor WASM, .NET base (in-process) |
tvOS carries the same BGTaskScheduler iOS does, so jobs schedule and run identically — same BGTaskSchedulerPermittedIdentifiers and processing background mode in Info.plist, same "the OS decides when" semantics. As on iOS, jobs do not run on the simulator. There is no MAUI on tvOS, so register through Shiny.Hosting.Native, not UseShiny().
Register jobs during service configuration. Each job is registered by its CLR type using AddJob<TJob> with optional fluent configuration. The job's Type is its unique identity — there is no separate string identifier.
using Shiny;
using Shiny.Jobs;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder.Services.AddJob<MySyncJob>(r => r
.WithForeground()
.WithInternet(InternetAccess.Any)
.WithBatteryNotLow()
);
return builder.Build();
}
}
AddJob<TJob> registers the infrastructure on first call (job manager + lifecycle task + battery/connectivity dependencies), then adds your job. Subsequent calls only add jobs.
Add the following background task identifiers to your Info.plist under BGTaskSchedulerPermittedIdentifiers:
com.shiny.jobcom.shiny.jobpowercom.shiny.jobnetcom.shiny.jobpowernetAlso enable the processing background mode.
No additional manifest setup is required. Shiny.Jobs uses AndroidX WorkManager under the hood (minimum periodic interval: 15 minutes).
Windows uses COM-activated in-process background tasks. Call ShinyJobsBackgroundTask.RegisterComServer() once in your App constructor before any trigger registration, and declare a matching windows.comServer extension in your appx manifest. Note: no background-mode triggering exists today on Windows — tasks fire while the process is running.
On the base .NET TFM there is no native OS scheduler — Shiny runs an in-process managed JobManager on a recurring timer (default 30s; configurable via the static JobManager.Interval property, minimum 15s, maximum 5 minutes). Jobs only execute while the host process is alive.
There is no separate Shiny.Jobs.Blazor package — reference Shiny.Jobs directly on all plain .NET targets (Blazor WASM included). AddJob registers IConnectivity and IBattery for you on every target - Shiny.Core picks the Linux or browser implementation at runtime. The one gap is plain .NET on Windows or macOS (a console or service, not MAUI): there is no battery API there, so register your own IBattery or the JobManager cannot be built. To replace the defaults with your own implementation on any target, register yours before AddJob — the auto-registration never replaces an existing one.
using Shiny;
using Shiny.Jobs;
// Linux / Blazor WASM - battery + connectivity are registered by AddJob
// Windows / macOS console - register an IBattery first: services.AddSingleton<IBattery, MyBattery>();
services.AddJob<MySyncJob>(r => r
.WithForeground()
.WithInternet(InternetAccess.Any)
);
The in-process JobManager is an IShinyStartupTask, so the Shiny host must run: UseShiny() in a MAUI app (including Linux GTK and macOS), await host.Services.UseShiny() after Build() on Blazor WASM, or host.Run() from HostBuilder in a console/service app.
Blazor WASM caveat: the in-process JobManager only runs while the tab is open. Background tabs are throttled (~1 min timer floor on Chromium), may be frozen after ~5 minutes, and iOS Safari kills background WASM aggressively. There is no way to run C# jobs via Service Worker Background Sync because the SW has no access to the WASM runtime. For background HTTP work specifically, use Shiny.Net.Http (AddBlazorHttpTransfers).
When generating job-related code, follow these conventions:
IJob directly for simple jobs, or inherit from the Job abstract base class for jobs that need a minimum interval between runs (MinimumTime).typeof(TJob) to RunJob(...); iterate GetJobs() for the registered set.IJob.Run takes only CancellationToken — there is no JobInfo argument. If a job needs configuration, inject it through the constructor or read from a settings store.CancellationToken — the platform may cancel a run on time-budget expiry; check cancelToken.ThrowIfCancellationRequested() between work units.WithForeground() when the job should also execute periodically while the app is in the foreground (driven by JobLifecycleTask — platform builds only).WithInternet(InternetAccess.Any | Unmetered) to require connectivity before the job runs.WithCharging() / WithBatteryNotLow() for power-sensitive jobs — be aware these may delay a job indefinitely under hostile conditions.RequestAccess() (on the concrete JobManager via AbstractJobManager) before relying on background execution, so you can guide the user if a platform configuration is missing.services.AddJob<TJob>(...). There is no public runtime-register API on IJobManager.Job (e.g., DataSyncJob, CleanupJob).Jobs/ folder or namespace within the project.Run gracefully; unhandled exceptions are caught by the manager, logged, and surfaced via the returned JobRunResult.RequestAccess() on startup and guide the user if background jobs are not available (AccessState.NotSetup, AccessState.Restricted, AccessState.Denied, etc.).BGProcessingTask budgets are short.DeviceCharging = true or BatteryNotLow = true means the job may not run for extended periods under hostile conditions.InternetAccess.Any over Unmetered unless the job transfers large amounts of data.Job base class with MinimumTime when the OS may invoke your job more often than necessary and you want a simple in-memory throttle.RunJob(typeof(TJob)) for event-driven on-demand runs of a registered job. The job runs normally (inline); there is no extended-execution / background-task wrapping.What SKILL.md sets; muted values are Claude Code's defaults
57 skills in this plugin
/localizegenGenerate strongly-typed localization classes from .resx resource files using Shiny.Extensions.Localization.Generator for .NET applications/shiny-accessorysetupGenerate code using Shiny.BluetoothLE.AccessorySetup - the system accessory pairing sheet for BLE devices (AccessorySetupKit on iOS 18+, CompanionDeviceManager on Android) with no MFi, no location prompt and no general Bluetooth prompt on iOS; picked accessories open as Shiny.BluetoothLE peripherals, and Android adds background presence (device appeared / disappeared) events/shiny-actorsGenerate code using Shiny.Actors — Orleans-style virtual actors without the ceremony, AOT/trim-clean, running anywhere .NET runs including .NET MAUI and Blazor WebAssembly. Covers actor interfaces and source-generated proxies, the ShinyActorBuilder (AddShinyActors), persistent state with ETags, named states and auto-save, event-sourced JournaledActor with snapshots, state and event migrations, typed streams (durable, implicit consumers), timers and persistent reminders (background jobs via Shiny.Jobs, on-time OS notifications via Shiny.Notifications), concurrency control ([Reentrant], [AlwaysInterleave], [ReadOnly], [StatelessWorker]), call filters and request context, OpenTelemetry traces and metrics, remoting over HTTP (Shiny.Net.HttpServer server, RemoteActorSystem client), mDNS discovery of actor servers, Shiny.DocumentDb storage (SQLite, PostgreSQL, IndexedDB...), and the ActorTestHost testing kit.npx claudepluginhub shinyorg/skills --plugin shinyOther plugins' skills for the same job