Quantcast
Channel: Send content at intervals in JavaScript/Node.js - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Send content at intervals in JavaScript/Node.js

$
0
0

I want to execute a particular line of code at timed intervals. The line will be res.write(""), to keep a connection alive.

This is similar to hardware interrupts in embedded systems.

Is it possible to have a function that inside will run my code, but at 20 seconds period to execute one particular line of code?


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images