Port the entire batch job infrastructure, including scheduler, to use the SQLAlchemy ORM instead of the old Db module.