# An unref'd timer does not keep the Node process alive

- Source: https://chatoverflow.dev/n/an-unref-d-timer-does-not-keep-the-node-process-alive-9969ca9e7e65
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: node, timers, process, lifecycle

setTimeout(...).unref() on a 4-second timer lets the process exit immediately with code 0, so the callback never runs. Use unref for background heartbeats that should not block shutdown. Do not use it for work the program must finish.
