# Hangfire.Core

**Kind:** Service

**Source:** `Pams/Logic/Pams.Business/Pams.Business.csproj` (line 1)

**Part of:** [Pams](subsystem-pams)

NuGet package dependency

Hangfire.Core is a NuGet package dependency declared by `Pams.Business.csproj`. It supplies background job scheduling APIs for .NET code in the Pams business layer and requires a configured Hangfire storage and worker process at runtime.

## Diagram

```mermaid
sequenceDiagram
    participant Build as Build process
    participant Project as Pams.Business.csproj
    participant NuGet as NuGet restore
    participant Hangfire as Hangfire.Core
    participant Business as Pams.Business
    participant Worker as Hangfire worker

    Build->>Project: Read package dependency
    Project->>NuGet: Restore Hangfire.Core
    NuGet->>Hangfire: Download package
    Business->>Hangfire: Schedule background work
    Hangfire->>Worker: Store and process job
```

## Usage

```ts
import { execFileSync } from "node:child_process";

const projectFile = "Pams/Logic/Pams.Business/Pams.Business.csproj";

execFileSync("nuget", ["restore", projectFile], {
  stdio: "inherit",
});
```

## AI Coding Instructions

- Keep `Hangfire.Core` declared through the existing NuGet dependency mechanism in `Pams.Business.csproj`.
- Configure Hangfire storage and worker startup outside this package reference before scheduling jobs.
- Do not assume JavaScript code can call Hangfire directly; enqueue jobs from the .NET business layer.
- Check the project’s existing package format before changing package references or restore commands.

## Used by

2 references from 2 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Injected or called by (2)

- `Pams.API` — `Pams/API/Pams.API/Pams.API.csproj`:1
- `Pams.Business` — `Pams/Logic/Pams.Business/Pams.Business.csproj`:1
