How do I change String Objects daily in Express/Node.JS?

17 Views Asked by At

As title states I have 6 string objects that I would like to update daily at midnight within Node.JS. One is a regular string and the other is an array of strings.

I know this isn't natively supported in NodeJS so I had looked into Node-Scheduler and Cron Jobs but they didn't look to do exactly what I needed.

Let's say today, March 3rd I want

let answer = "Bill Gates"

and tomorrow March 4th I want

let answer = "Elon Musk"

is there a way to do this?

0

There are 0 best solutions below