SchedulerClientType.TEST, package tooling-scheduler-test) runs schedule handlers on demand in backend tests. It does not register BullMQ job schedulers and does not fire cron ticks.
Why it exists
Production uses BullMQ job schedulers in the consumer process. Backend Jest suites need the same schedule handlers without Redis, without a running consumer, and without waiting for cron. The test client is that adapter — similar toMailerClientType.LOCAL or other test doubles in the tooling system.
Behavior
Handlers live in
apps/backend/src/tools/scheduler/schedules/ and are shared between both clients.
Configuration
Onlyapps/backend/src/configuration/test.ts:
SchedulerClientType.BULLMQ with connection, schedulerQueueName, schedulerTickJobName, and schedules[]. See BullMQ scheduler.
Using in tests
{ scheduleName, firedAt } and tools, same as a production tick. Use buildEnqueueJobId from shared when enqueueing from the handler.
When tools.logger / tools.metrics are present, runScheduleNow emits scheduler-test logs and scheduler.run_now.* metrics (see Scheduler overview monitoring table).
Mental model
What’s next?
- Scheduler overview — handlers, registry, adding schedules.
- BullMQ scheduler — production Redis client and config options.
- Configuration — env-specific
tools.*config.
