IW4MAdmin Scheduled restarts

Topic created · 2 Posts · 61 Views
  • Hello Plutonium,

    I wonder how I can create scheduled restarts for IW4MAdmin. I want to create a scheduled task on my windows server but I cannot think of a way to close a specific conhost.exe hence I have multiple instances running for IW4MAdmin and the respective Pluto/Tekno Servers. The PID changes after every execution so otherwise I would have just run taskkill /IW PID. Any Idea how to schedule a restart?

  • @SuckOnMyProness
    save pid to file when starting, kill pid when restarting

    something like this should work for saving the pid
    powershell -Command "(Start-Process whatever.exe -passthru).ID | Out-File -FilePath pid.txt"

    make sure to give the pid file a unique name for every instance you have running and when restarting read the pid from the file to kill the process.

Log in to reply