> ## Content Index
> Fetch the complete content index at: https://debugly.dev/llms.txt
> Use this file to discover other available public pages before exploring further.

# Node Event Loop Phases: Where Your setTimeout Really Runs
- URL: https://debugly.dev/node-event-loop-phases-order/
- Published: 2026-09-13T11:30:00.000Z
- Updated: 2026-10-17T05:48:51.000Z
- Description: setTimeout zero and setImmediate are not the same thing, and which one runs first depends on where in the event loop you called them.
- Author: Rohit Bhadani
- Tags: Deep Dive, Node.js, JavaScript

| Phase             | Drains                                                                   |
| ----------------- | ------------------------------------------------------------------------ |
| timers            | callbacks scheduled by setTimeout and setInterval whose deadline arrived |
| pending callbacks | deferred system callbacks, mostly I/O errors                             |
| idle, prepare     | internal                                                                 |
| poll              | new I/O events, and where the loop blocks waiting for I/O                |
| check             | callbacks scheduled by setImmediate                                      |
| close callbacks   | socket and handle close events                                           |

---

Published on [debugly.dev](https://debugly.dev/) by [Rohit Bhadani](https://debugly.dev/about/) | Founder of [Krova Cloud](https://krova.cloud/?ref=debugly.dev)