How can I make my arduino start when a magnet is sensed, and stay running until the application determines it was to shut down
Put your Arduino into deep sleep and attach an interrupt to a pin that is monitoring your reed switch. Once triggered it can run your code before deep sleeping again