changed the code to check between which hours you can call the background service