title: Close a subprocess that was opened in a new window in python
body: <p>I have a .BAT file that runs a python script that can take many hours to finish, (I need to end it after a maximum of x hours)</p>
  <p>I am trying to find a way to schedule this using python.</p>
  <p>My idea was to Create a .PY that will initialize this .BAT file, then put a time.sleep, the somehow close that .BAT that was previously started.</p>
  <pre><code>subprocess.Popen('C.bat', creationflags=subprocess.CREATE_NEW_CONSOLE)
  time.sleep(14400)
  '''Somehow close the above started .BAT'''
  </code></pre>
  <p>I would then have to wrap this in a while loop to have it repeat.</p>