#Run code on the specified day/time #https://codepad.co/snippet/87404a <?php //Get current(server) time | 24-hour format $currentTime = date(G); //Textual representation of a day (three letters Mon - Sun) $dayOfTheWeek = date(D); //perform the check if condition is true run the code otherwise skip if ($currentTime >= 10 && $currentTime < 14 && $dayOfTheWeek == "Sun") { // run your code } ?>