Added automatic scheduler detection