Peter
Peter

Reputation: 1669

Node.js Run service only at a suitable time

I made a service in Node.js which runs fine. But I've decided to make a change. Untill the time isn't between lets say 7pm and 5am, don't run the service - be in standby mode - or sleep.

Which command or method to use? Is there something specific for such cases?

Upvotes: 0

Views: 191

Answers (1)

SantanuMajumdar
SantanuMajumdar

Reputation: 916

NodeCron does the Job for you.

You can also try node-schedule to cron the jobs.

Thanks.

Upvotes: 2

Related Questions