E
E
Evgeny Zalivadny2021-04-15 17:05:48
Parsing
Evgeny Zalivadny, 2021-04-15 17:05:48

How to automatically run Node.js parsers on Linux?

There is a Node.js script that should run every 80 minutes, make an API request and insert the result into the database. There will be several such parsers, all of which will request data at different intervals. All this will be given through the web face on React.

Question:
What tools can be used to make everything look the same both on the local machine (Linux Mint) and on the prod (if through the docker, then I'm not talking about the docker itself, but about what should be spinning inside it)?
It is required that everything itself rises when the car starts and rises again if it falls.

Need to look towards Supervisord, Cron, RabbitMQ Service Workers?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Shashenkov, 2021-04-16
@teknik2008

The very first thing that comes to mind is https://www.npmjs.com/package/node-cron
Start the main process with cron, and run other processes in a separate cron thread.

M
mitya_k, 2021-04-16
@mitya_k

  • The simplest is cron
  • Or use something like this node-schedule , but then you need to be more careful with errors and load
  • Well, the last thing is to look at message brokers, in most cases for periodic it's redundant

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question