make sleep interval dependent on date of last batch