Modified batchScheduler implementation