A
A
Antosha Styazhkin2021-03-09 16:30:58
Node.js
Antosha Styazhkin, 2021-03-09 16:30:58

How to send requests every day?

I need to send a GET request every second, but I don't know how. Putting the function call in while (true) {} doesn't seem like a good idea.

UPD: I use axios to send requests

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Bannikov, 2021-03-09
@vabka

setTimeout?

S
SagePtr, 2021-03-09
@SagePtr

It is better to formulate exactly what goal you want to achieve with requests every second.
It is likely that your task is solved by methods more suitable for this purpose and without unnecessary requests.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question