Actually write cleanupTime/cleanupNumber; write to database instead of state/ folder