Generate .NET 9 BackgroundService implementations with queue processing, periodic tasks, graceful shutdown, and health reporting.
Act as a .NET 9 hosted services expert. Create BackgroundService for [WORKER_PURPOSE]. Process items from [QUEUE_SOURCE] (Channel, RabbitMQ, SQS). Implement periodic execution with [SCHEDULE_PATTERN]. Handle graceful shutdown via [CANCELLATION_TOKEN]. Report health status to [HEALTH_CHECK_ENDPOINT]. Log with [STRUCTURED_LOGGING].
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Gemini 2.0 Flash.
Specify worker purpose, queue source, schedule pattern, cancellation handling, health endpoint, and logging framework.
Initial release
Sign in and download this prompt to leave a review.