Im a seasoned dev that just wants to know if PHP is capable of setting variables at certain times of the day. For instance, I have a video of the day widget which I can manage on my own by changing the WHERE id='$x
', but I'd like $x to $x to be randomized like executing ORDER BY rand() LIMIT 1.
The issue with ORDER BY rand() LIMIT
is that it changes every page load when I'd just want the '$x' from WHERE id='$x'
to be changed at midnight every day.
So does PHP allow time-based executions, or is that considered a cron job? Please note I have no idea im just guessing terms.