Dear Changyu,
I would suggest you use an existing scheduler function as template. The round robin scheduler is the most basic one, so it would be a good idea to start with a copy of that and add whatever metric you want to implement.
Next to a new scheduler function, you will have to add this new type also in the schedulerFactory.m in the +schedulers package.
Best regards,
Martin