So I have a piece of code which is supposed to reset a message of the date (motd) at midnight, my aim is that once the time reached midnight (00:00:00 GMT) that it resets the message of the day back to its original state. So far i have tried the following:
if (gmdate('H:i:s') === '00:00:00') { mysql_query(//execute code) }
all suggestions are appreciated. Thank you.
Edit: forgot to mention my website is hosted from a webhost called nitrousnetworks not localhost. will this affect anything?
Edit-2: found a cron job section in cPanel X. i've set it to run every 24h at midnight but what do i put in the Command:
section?
Edit-3: Thankyou all, i believe i have got it now :)