make scheduler work on page load