Update scheduler to respect last check date when scheduling future updates, and wrote some tests for the scheduler