Added support a custom SchedulerFactory