change notice period for wp cron and small refactoring