When you close out the black box it shuts down your server...therefore you will need to keep the box open as long as you want your server up.
Also just type heartbeat in the black box, not the console, to get the command to work
Finally, Please dont double post just edit your last one to include what you want to say.