external schdeuler: improve examples

Move common code to methods for readability

Signed-off-by: Noam Slomianko <nslomian@redhat.com>
Change-Id: I70437769cf3a364b8320af9a935810062636e401