G
G
German Shestak2018-09-28 20:11:05
Node.js
German Shestak, 2018-09-28 20:11:05

How to make certain code run by date?

Good day.
The question is this:
There is a VK bot that adds some information to the database.
How can I implement deletion / moving to the archive in a week?
I am using lowdb.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Q
qq1, 2018-09-28
@qq1

It looks like you need to schedule tasks, here are the options from simple to complex:
cron -> node-schedule -> agenda

D
Dark_Scorpion, 2018-09-28
@Dark_Scorpion

There is a node-cron npm module for these tasks inside a Node.js application. Alternatively, you can use the standard cron from linux.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question