Running the file on the servers

I have a project in which I need to make a match that is played on a given day according to the calendar. When the day of the match occurs I need code to be run that will make the match happen, except that this code should only be run on servers. I don’t know how I can do this or how to do it any other way. I’m doing it in PHP if anything.
Thanks for help :slight_smile:


I’m not sure what you mean by “match”, but the cron jobs tool seems like what you may be looking for.


If you want a task to run on a given date, I would set up a cron job that it triggered once per day. Then, in the PHP code that’s triggered the the cron job, you check the current date, and if it’s the date of the match, you can execute the task.

Cron Jobs are the main way to execute scheduled tasks. You can’t use them to schedule something to run at a specific time and date, but you can use the periodic tasks with your own code to check if it’s time to run.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.