简体   繁体   中英

How to automatically close the cmd window after executing a seperate node process from it

I'm using a batch file to schedule a.js bot. The bot is exiting his process after he is done with his job but using the batch cmd window as log output.

I'm using process.exit(1) to exit his process.

My problem now is that the cmd window wont close automatically but needs an input to do so:

Press Enter or Esc to close console...

batch script:

cd "[path]"
node bot.js
exit

Problem solved!

Thanks to Anon Coward for his/her advice, the settings of ConEmu screwed me over.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM