setup-batch-job-workers

Schedule and orchestrate recurring batch jobs via RabbitMQ queues.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Edgame2/castiel2 --skill setup-batch-job-workers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-batch-job-workers
Source: https://github.com/Edgame2/castiel2/tree/main/.cursor/skills/setup-batch-job-workers
Command: npx skills add https://github.com/Edgame2/castiel2 --skill setup-batch-job-workers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Sets up and coordinates scheduled batch jobs using RabbitMQ to trigger and track long-running data processing workflows across orchestrator and worker containers.

Core Features & Use Cases

  • Scheduler: uses node-cron to publish workflow.job.trigger to coder_events for defined jobs like risk-clustering, account-health, industry-benchmarks, risk-snapshot-backfill, propagation, model-monitoring, and outcome-sync.
  • Queue Setup: binds bi_batch_jobs to coder_events for durable messaging and ensures rabbitmq.queue_batch_jobs is configured in both orchestrator and workers.
  • Worker: BatchJobWorker consumes from bi_batch_jobs and routes on job type to the corresponding service, then publishes workflow.job.completed or workflow.job.failed with timestamps.

Quick Start

Start the Batch Job Scheduler by calling await batchJobScheduler.start() in server.ts.

Frequently Asked Questions about setup-batch-job-workers

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

FAQPage Schema
How do I schedule recurring batch jobs with RabbitMQ in Node.js?

You can schedule recurring batch jobs with RabbitMQ by using a node-cron Scheduler to publish workflow.job.trigger events to a durable bi_batch_jobs queue, which a BatchJobWorker then consumes to execute the tasks.

How does RabbitMQ orchestrate long-running data processing across multiple workers?

RabbitMQ orchestrates long-running data processing by binding a durable bi_batch_jobs queue to coder_events, allowing an orchestrator to publish job triggers and distributed workers to consume and process them asynchronously.

Can I use node-cron to trigger RabbitMQ workflows for risk clustering and account health jobs?

Yes, you can use node-cron to trigger RabbitMQ workflows for risk clustering and account health jobs by defining cron schedules that publish workflow.job.trigger events for the worker services to consume.

How do I track completed or failed batch jobs in a RabbitMQ worker?

You track completed or failed batch jobs in a RabbitMQ worker by having the BatchJobWorker publish workflow.job.completed or workflow.job.failed events with contextual timestamps back to the coder_events exchange.

Do I need to configure the RabbitMQ queue in both the orchestrator and worker services?

Yes, you must configure the rabbitmq.queue_batch_jobs binding in both the orchestrator and worker services to ensure durable messaging and successful consumption of the workflow.job.trigger events.

What is the best way to start a batch job scheduler in an Express server?

The best way to start a batch job scheduler in an Express server is to initialize the scheduler instance and call await batchJobScheduler.start() within your server.ts file to begin publishing cron triggers.