Refactor: scheduler: best practices when scheduling resource actions
Rename stage5() to schedule_resource_actions() for clarity, make static,
drop its unused return value, add a doxygen block, and improve variable names,
formatting, and log messages.