added INIT_SCHEDULE_ENTRY macro for simplifying code.