diff --git a/packages/runner/lib/monitor.ts b/packages/runner/lib/monitor.ts index 8e01718d7e..16158e7d11 100644 --- a/packages/runner/lib/monitor.ts +++ b/packages/runner/lib/monitor.ts @@ -93,7 +93,7 @@ export class RunnerMonitor { private checkIdle(): NodeJS.Timeout { // eslint-disable-next-line @typescript-eslint/no-misused-promises return setInterval(async () => { - if (this.tracked.size == 0) { + if (this.idleMaxDurationMs > 0 && this.tracked.size == 0) { const idleTimeMs = Date.now() - this.lastIdleTrackingDate; if (idleTimeMs > this.idleMaxDurationMs) { logger.info(`Runner '${this.runnerId}' idle for more than ${this.idleMaxDurationMs}ms`);