title: Nodejs: Run a js file on node server startup
body: <p>I have some piece of nodejs code (scheduler and few db queries) that i want to run each time along with rest of the app <strong>(Express App)</strong> when the node server is started. <br>
  One way which i can think of is creating a batch file which will have 2 lines: one to start the node server and the other to run that node js code (Haven't tested this approach though). <br><br>
  I was thinking if there could be a way to execute that static code via server.js file. I want to run this with in same instance.<br>Any help here?</p>