Answer the question
In order to leave comments, you need to log in
How to write a Node.js script that cleans up the database from time to time?
In general, there is a base that needs to be cleaned from time to time. That is, delete old records, accompanying this with the deletion of files, the paths to which are stored in this database. I want it to work offline, once every 1 hour approximately. How it is better to implement it?
Stack
Answer the question
In order to leave comments, you need to log in
It is better to add a script to the cron so that he does not need to eat memory all the time.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question