I want to know if I can change system time on computer for node-cron to re-run?, if not how can I test a function that runs every month without waiting for a month
Asked
Active
Viewed 109 times
0
-
1Change it to run every minute? :P Or invoke it manually, of course. – Julia Mar 07 '21 at 19:01
-
I wanted to know if changing system time can trigger it to run? – Gyimah Francis Mar 07 '21 at 19:02
-
1I don't see why not – Julia Mar 07 '21 at 19:03
1 Answers
1
Changing time back and forth can have negative/strange effects on database, run on this server, other scheduled jobs, logs and so on. So the better way is to duplicate the cron records and change the time of new record to next 10-15 minutes. After this do not forget to remove this new record from cron.

Romeo Ninov
- 6,538
- 1
- 22
- 31