NestJS cron scheduler stops running silently when app is hosted as Windows Service

Hey everyone,

I’m running a NestJS application as a Windows service on a Windows server.
Inside this service (named sftp), I have 5 cron schedulers configured. Each runs at different intervals (e.g., every 1 minute, every 5 minutes, etc.).

The issue …


This content originally appeared on DEV Community and was authored by dhil rohith

Hey everyone,

I’m running a NestJS application as a Windows service on a Windows server.
Inside this service (named sftp), I have 5 cron schedulers configured. Each runs at different intervals (e.g., every 1 minute, every 5 minutes, etc.).

The issue I’m facing:

The 1-minute scheduler and 5-minute scheduler stop running unexpectedly.

The service itself is still up and running, and the other schedulers continue working fine.

From the logs, I can see that the job starts and completes normally (including successful disconnect).

Normally, the scheduler should fire again in the next cycle, but it never does.

No errors are logged, no suspicious behavior before it stops, and processing time is normal.

I already have error handling in place, so it doesn’t look like it’s silently failing.

Has anyone else experienced a scheduler just stopping without errors while the rest of the app continues?
Any ideas on what could cause this or how to debug further would be really helpful.

Logs (just before it stopped running):

[2025-08-20 14:30:00] [SftpOldService] INFO: Old File Processing Job >> Starting scheduled handleCronOld... | Host: SN2EBYX1C0032, PID: 24325
[2025-08-20 14:30:00] [SftpOldService] INFO: Old File Processing Job >> Started | Host: SN2EBYX1C0032, PID: 20456
[2025-08-20 14:30:00] [SftpOldService] INFO: Old File Processing Job >> Started with config:
Host: 123.227.7.73
Port: 22
Username: xxxyyy
Path: /mh | Host: SN2EBYX1C0032, PID: 24325

[2025-08-20 14:30:00] [SftpOldService] INFO: SFTP Connected successfully to 123.227.7.73 | Host: SN2EBYX1C0032, PID: 24325
[2025-08-20 14:30:00] [SftpOldService] INFO: Old File Processing Job >> SFTP CONNECTED | Host: SN2EBYX1C0032, PID: 24325
[2025-08-20 14:30:00] [SftpOldService] DEBUG: Old File Processing Job >> Files in directory /mh: | Host: SN2EBYX1C0032, PID: 24325
[2025-08-20 14:30:00] [SftpOldService] INFO: Old File Processing Job >> No CSV files found in SFTP directory | Host: SN2EBYX1C0032, PID: 24325
[2025-08-20 14:30:00] [SftpOldService] INFO: SFTP disconnected successfully | Host:SN2EBYX1C0032, PID:24325


This content originally appeared on DEV Community and was authored by dhil rohith


Print Share Comment Cite Upload Translate Updates
APA

dhil rohith | Sciencx (2025-08-26T07:13:12+00:00) NestJS cron scheduler stops running silently when app is hosted as Windows Service. Retrieved from https://www.scien.cx/2025/08/26/nestjs-cron-scheduler-stops-running-silently-when-app-is-hosted-as-windows-service/

MLA
" » NestJS cron scheduler stops running silently when app is hosted as Windows Service." dhil rohith | Sciencx - Tuesday August 26, 2025, https://www.scien.cx/2025/08/26/nestjs-cron-scheduler-stops-running-silently-when-app-is-hosted-as-windows-service/
HARVARD
dhil rohith | Sciencx Tuesday August 26, 2025 » NestJS cron scheduler stops running silently when app is hosted as Windows Service., viewed ,<https://www.scien.cx/2025/08/26/nestjs-cron-scheduler-stops-running-silently-when-app-is-hosted-as-windows-service/>
VANCOUVER
dhil rohith | Sciencx - » NestJS cron scheduler stops running silently when app is hosted as Windows Service. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/08/26/nestjs-cron-scheduler-stops-running-silently-when-app-is-hosted-as-windows-service/
CHICAGO
" » NestJS cron scheduler stops running silently when app is hosted as Windows Service." dhil rohith | Sciencx - Accessed . https://www.scien.cx/2025/08/26/nestjs-cron-scheduler-stops-running-silently-when-app-is-hosted-as-windows-service/
IEEE
" » NestJS cron scheduler stops running silently when app is hosted as Windows Service." dhil rohith | Sciencx [Online]. Available: https://www.scien.cx/2025/08/26/nestjs-cron-scheduler-stops-running-silently-when-app-is-hosted-as-windows-service/. [Accessed: ]
rf:citation
» NestJS cron scheduler stops running silently when app is hosted as Windows Service | dhil rohith | Sciencx | https://www.scien.cx/2025/08/26/nestjs-cron-scheduler-stops-running-silently-when-app-is-hosted-as-windows-service/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.