S
S
swpavlov2018-12-06 00:01:33
Node.js
swpavlov, 2018-12-06 00:01:33

How to make a bot automatically send messages at a given time nodejs?

Beginner
I'm making the first bot in VK for experience. You need to make him send messages in the morning and in the evening.
How can this be done?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Perov, 2018-12-06
@SnaIP

cron for node

F
Floydreme, 2018-12-06
@FloydReme

const Time = new Date()

if (Time.getHours() === /*некоторый час*/)
{
   //Code
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question