Should fix #59: DB loop script for maintenance scripts