I have several scripts that I have running through tasking manager that perform various functions on a file geodatabase. However when they run the generate a schema lock. Is there a graceful way to end a python script or should I use os.remove(schema.ini)?