PrecisionScheduler 1.1.0
dotnet add package PrecisionScheduler --version 1.1.0
NuGet\Install-Package PrecisionScheduler -Version 1.1.0
<PackageReference Include="PrecisionScheduler" Version="1.1.0" />
<PackageVersion Include="PrecisionScheduler" Version="1.1.0" />
<PackageReference Include="PrecisionScheduler" />
paket add PrecisionScheduler --version 1.1.0
#r "nuget: PrecisionScheduler, 1.1.0"
#:package PrecisionScheduler@1.1.0
#addin nuget:?package=PrecisionScheduler&version=1.1.0
#tool nuget:?package=PrecisionScheduler&version=1.1.0
PrecisionScheduler for Sitecore
PrecisionScheduler for Sitecore is a drop-in replacement for the standard Task Scheduling found in Sitecore. Check out this article for more details.
Required Dependencies
- Cronos
- Hangfire.AspNet
- Hangfire.Core
- Hangfire.MemoryStorage
- Sitecore.Kernel
- Sitecore.Owin
Configuration
Your existing schedules should "just work". If you would like to make use of more advanced scheduling, you can use a cron expression directly in the Schedule field of a Sitecore scheduled task item.
Configuration Reference
| Property | Default | Description |
|---|---|---|
StartupDelaySeconds |
30 |
Seconds to wait after OWIN startup before the first schedule sync |
RefreshSchedule |
*/2 * * * * |
Cron expression controlling how often schedules are synced from Sitecore |
RefreshMisfireBehavior |
FireOnce |
How Hangfire handles missed ticks of the sync job itself. Options: FireOnce, Ignore. Does not affect individual Sitecore schedule items — see below |
StartupCatchUpEnabled |
true |
Whether to fire a single catch-up execution for jobs that missed their window during an outage or restart. Set to false to resume normal cadence without any catch-up |
MissedJobLookbackDays |
30 |
How far back (in days) to look for missed runs on startup. Applies to infrequent jobs (daily or longer) only. Sub-daily jobs (hourly, every N minutes) always use a one-interval window since their next run is imminent |
Note: PrecisionScheduler is CM-only. The processor is gated by
role:require="Standalone or ContentManagement"and will not activate on CD or other roles.
NuGet PackageReference
If you are installing using PackageReference instead of packages.config you'll want to either copy over the configuration files included in this repo or create your own.
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone or ContentManagement">
<pipelines>
<owin.initialize>
<processor type="PrecisionScheduler.Pipelines.Initialize.Scheduler, PrecisionScheduler">
<StartupDelaySeconds>30</StartupDelaySeconds>
<RefreshSchedule>*/2 * * * *</RefreshSchedule>
<RefreshMisfireBehavior>FireOnce</RefreshMisfireBehavior>
<StartupCatchUpEnabled>true</StartupCatchUpEnabled>
<MissedJobLookbackDays>30</MissedJobLookbackDays>
</processor>
</owin.initialize>
</pipelines>
<scheduling>
<agent name="Master_Database_Agent">
<patch:attribute name="interval" value="00:00:00" />
</agent>
</scheduling>
</sitecore>
</configuration>
Cron vs Sitecore Recurrence Format
PrecisionScheduler accepts both formats in the Schedule field:
| Format | Example | Meaning |
|---|---|---|
| Sitecore recurrence | 20010101T000000\|20990101T000000\|127\|01:00:00 |
Every hour, all days |
| Cron expression | 0 * * * * |
Every hour, on the hour |
When a cron expression is detected (matches the standard 5-part cron pattern) it is used as-is. Otherwise the native Sitecore recurrence string is parsed and converted to a cron expression automatically.
Troubleshooting
Processor not loading after install
Verify the assembly name in your config patch matches PrecisionScheduler (no trailing s). The correct type reference is:
type="PrecisionScheduler.Pipelines.Initialize.Scheduler, PrecisionScheduler"
Jobs not firing
Check the Sitecore log for [PrecisionScheduler] entries. A WARN entry for a schedule item means its recurrence field is empty or could not be parsed. A ERROR entry means an exception occurred during a refresh cycle — the scheduler will retry on the next tick.
Unexpected jobs firing on startup PrecisionScheduler uses a frequency-aware catch-up window to decide whether to queue a missed job on restart:
- Sub-daily jobs (hourly, every N minutes) — only fire a catch-up if the missed run is within one interval of now. If the next slot has already passed too, the job resumes its normal cadence.
- Infrequent jobs (daily or longer) — fire a catch-up if the miss falls within
MissedJobLookbackDays(default 30). This ensures a weekly job down over a weekend still catches up rather than waiting another full week.
To disable all startup catch-up, set StartupCatchUpEnabled to false. To narrow the window for infrequent jobs, lower MissedJobLookbackDays.
Jobs not catching up after a long outage
If a missed run is older than MissedJobLookbackDays, it is skipped and the job resumes its next scheduled occurrence. Increase MissedJobLookbackDays to extend the window, or set StartupCatchUpEnabled to false and handle catch-up manually.
Changelog
See CHANGELOG.md for a full history of changes.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Cronos (>= 0.8.4)
- Hangfire.AspNet (>= 0.3.0)
- Hangfire.Core (>= 1.8.22)
- Hangfire.MemoryStorage (>= 1.8.1.2)
- Microsoft.Extensions.DependencyInjection (>= 7.0.0)
- Sitecore.Kernel (>= 10.4.0)
- Sitecore.Owin (>= 10.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.