Adding New Schedule using addScheduleEntry

Need help!!!
I’m trying to add new Schedule using addScheduleEntry, it adds new entry in SQL database Schedule table BUT every alternate row is missing RunID.
For reference, I have attached screenshot below.