DEV Community

Discussion on: Schedule the DB backup cron job with nodejs

 
yashvant profile image
yashvant vala • Edited

Hi
A. Index.js can be launched by manually if you just want to learn something to want to run in local or want to do any task only once, In ideal scenario it will be run by system when web server starts and it will be constantly listening.

B. Yes you are right but some applications may have web server and db host on single instance and i haven't covered any production ready or best practices to get things done in this article, but surely it is not to hard to search i guess.

C. I haven't tried crontab but the goal is to run it in certein time after setting it one time in code and avoid manual task by user.

Hope my answer make sense :)