We do this here to mark it as running. This avoids multiple runs of same batch at the same time.