A simple, native-feeling job scheduler for .NET built on top of IHostedService, filling the gap between BackgroundService and complex schedulers.
NCronJob is a job scheduling library for .NET that sits on top of IHostedService, providing a simple way to schedule and run background tasks. It solves the problem of needing more than basic BackgroundService capabilities but less complexity than full-featured schedulers like Hangfire, offering cron-based and instant job execution without external dependencies.
.NET developers building applications that require scheduled background tasks, such as data processing, report generation, or periodic cleanup jobs, who want a lightweight, integrated solution.
Developers choose NCronJob for its native .NET integration, minimal setup (no database required), and straightforward API that balances functionality with simplicity, making it ideal for scenarios where persistence and job history are not required.
A Job Scheduler sitting on top of IHostedService in dotnet.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Seamlessly integrates with ASP.NET Core's dependency injection and IHostedService, allowing jobs to access services just like any other .NET component, as shown in the job examples using ILogger and custom services.
No database or external dependencies required; jobs can be scheduled with a few lines of code using the Minimal Job API or IJob interface, reducing deployment complexity.
Supports both cron expressions with timezone awareness and instant job execution with delays or specific times, enabling versatile task management as demonstrated in the triggering examples.
Allows defining success or faulted handlers to chain jobs, enabling complex workflows without manual coordination, as illustrated in the job dependencies section.
Jobs and schedules are stored in-memory only, so all scheduled tasks are lost if the application restarts or crashes, which the README explicitly acknowledges as a design limitation.
There is no built-in logging or storage of past job runs, making it difficult to monitor performance, debug issues, or maintain audit trails without custom implementation.
Designed for single application instances; it does not natively support distributed locking or coordination, making it unsuitable for clustered or high-availability deployments without additional work.
NCronJob is an open-source alternative to the following products:
Quartz.NET is the .NET port of the Quartz job scheduler, providing enterprise-grade job scheduling capabilities for .NET applications.
HangFire is an open-source background job processing library for .NET applications that helps perform fire-and-forget, delayed, and recurring tasks.