S
S
Seva2016-11-24 18:08:37
JavaScript
Seva, 2016-11-24 18:08:37

How to correctly implement a daemon on a node?

Hey! I have never done anything with the node, so the question is stupid.
There is a function that should run once a minute and perform some actions. Everything seems to be simple -
setInterval(bot.check, 60000);
If you run the application on the forehead - node bot.jsthen everything works as expected.
If it pm2 start bot.jsdoesn't work.
What am I doing wrong? Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question