When it is 5p.m. I want that my website executes some php code. (I don’t know how to do this)
This is what it should do:
Check which contestants have subscribed in the subscribed list (I know how to do this).
Pick a random contestant to be the first, 2nd and 3rd. (I know how to do this)
Every 2 minutes, so a game takes about 20 minutes, and I want that every 2mins I can generate a random message. (I think I can do this with sleep)
What I am wondering, my server is linux, so I should use cronjobs I guess?
Can cronjobs do what I want/need?
I think it’s really hard to understand cronjobs.
I have looked some stuff up but I am still in the mainly in the dark.
Do I just code php and upload it to cronjobs?
I think you should do a little more research and then come back and ask specific questions. Cron jobs are just shell scripts run at regular intervals. There is nothing mystical about them. You could have a cron job like this:
php /blah/blah/myScript.phpand that would run a php script.