-1

I am running my node.js application exe file on windows 7/10 startup. It is working fine but some cases my exe stops working and is closed automatically. I want to create some scheduled job for checking whether my exe is running or not. If not running start the application and if running do nothing.

Please guide me to create this kind of schedule job with 10 minutes.

Filburt
  • 17,626
  • 12
  • 64
  • 115
Sathish
  • 199
  • 1
  • 11
  • Sounds like you should refactor your application to run as a proper Windows Service instead of hacking together such a ... workaround. – Filburt Jun 03 '19 at 11:48
  • I am creating node.js application as exe but it is closed some cases i am unable to find the reason – Sathish Jun 03 '19 at 11:56
  • [Running node.js as windows service](https://stackoverflow.com/a/15616912/205233) sounds even simpler than refactoring what I prosumed was a .Net application. – Filburt Jun 03 '19 at 12:21

1 Answers1

1

@ECHO OFF tasklist | find /i "app.exe" && echo process Already running || START "app.exe" "path"

create batch file using above code and use task scheduler for monitoring the exe is running

Dse
  • 74
  • 1
  • 9