add-background-job

Add recurring and one-time Hangfire background jobs in .NET applications.

230|29|Updated Dec 25, 2025
One-click install
npx skills add https://github.com/fpindej/netrock --skill add-background-job
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-background-job
Source: https://github.com/fpindej/netrock/tree/main/.claude/skills/add-background-job
Command: npx skills add https://github.com/fpindej/netrock --skill add-background-job

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of adding background jobs, whether they are recurring tasks or one-time operations, to your application, improving efficiency and offloading work from the main request thread.

Core Features & Use Cases

  • Recurring Jobs: Define and schedule jobs that run at regular intervals (e.g., daily cleanup, hourly reports).
  • One-Time Jobs: Enqueue immediate or delayed tasks for asynchronous execution (e.g., sending emails, processing files).
  • Use Case: Automatically schedule a daily job to clean up expired user sessions or enqueue a one-time job to send a welcome email to a new user immediately after registration.

Quick Start

Add a recurring daily cleanup job by creating a MyCleanupJob class and registering it.

Frequently Asked Questions about add-background-job

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I schedule recurring background jobs in a .NET application?

To schedule recurring background jobs in a .NET application, use Hangfire to define job logic in C# classes, register them with dependency injection, and enqueue them via IBackgroundJobClient for execution at regular intervals like daily cleanups or hourly reports.

What is the best way to enqueue one-time asynchronous tasks in .NET?

The best way to enqueue one-time asynchronous tasks in .NET is using IBackgroundJobClient to enqueue immediate or delayed jobs via Hangfire, offloading work like sending emails or processing files from the main request thread for deferred execution.

Does Hangfire support dependency injection for background tasks?

Yes, Hangfire supports dependency injection for background tasks by allowing you to define job logic within C# classes and register them with the dependency injection container before enqueueing them for scheduled or immediate execution.

When should I use background jobs for asynchronous task processing?

You should use background jobs for asynchronous task processing when you need to offload non-critical workflows from the main request thread, such as automatically cleaning up expired user sessions or sending welcome emails immediately after user registration.

Can I define background job logic directly inside C# classes?

Yes, you can define background job logic directly inside C# classes, register those classes with dependency injection, and then use IBackgroundJobClient to enqueue the methods for scheduled, recurring, or immediate asynchronous execution within your .NET application.