Simple Python/SQL job batching system