Created scheduler class and implemented enqueue function, also linked to the scheduled in endnodeswitch