diff --git a/gluon/newcron.py b/gluon/newcron.py index 47891342..637f8b7e 100644 --- a/gluon/newcron.py +++ b/gluon/newcron.py @@ -48,7 +48,13 @@ def stopcron(): global _cron_stopping _cron_stopping = True while _cron_subprocs: - _cron_subprocs.pop().terminate() + proc = _cron_subprocs.pop() + if proc.poll() is None: + try: + proc.terminate() + except: + import traceback + traceback.print_exc() class extcron(threading.Thread):