From my experience, a Glue job sometimes gets stuck instead of terminating gracefully after an exception is thrown. I suspect that your Glue service role is missing the required permissions to start the crawler. When you run it in your python console you might use a different role, which would explain your observation.
In order to verify that, print the response of the start_crawler request and wrap the call in a try/except block so that you can print the error and shut down the job.