In my Node app I am using setTimeout to schedule some tasks for later. My question is that if I restart my process or kill it, will the scheduled function still run?
A definitive no. The setTimeout function and its associated scheduling is a feature of the JS runtime, it's not an interface to any system level scheduling. Therefore when the process dies, everything dies with it.
vignesh
FullStack developer
i'll hop on to the 'NO' side, because when you terminate node you are terminating all the queues in event loop