Modify main to only run for 30 minutes and then sleep indefinitely