Rahul Desai
Rahul Desai

Reputation: 15501

Execute SQL query on a specific date

Its related to a website that I am developing, I want to deactivate all students who are being tutored, at the end of the semester. So, the user, on the admin side should be able to set the date when the semester is going to end and on that particular date, this query is to be executed and deactivate all students in the database. How do I do this using PHP and MySQL?

Upvotes: 0

Views: 417

Answers (2)

Craig Trombly
Craig Trombly

Reputation: 464

Or you can build your login system to be aware of an end-date to their login. That way, you do not need to worry about a cron. But if you do a cron type job, build a daily task cron job so that it is something that you can use for additional tasks that are similar

Upvotes: 1

safarov
safarov

Reputation: 7804

You can do time-based peridical runs with Cron Job.

Upvotes: 3

Related Questions