I am currently writing a “forum-like” website for our class, which works like a FAQ, where everyone from our class can post answers. I want to implement a system, where one student (class president) can upload these questions (Question which where frequently asked by the teachers, and are likely to become test-questions) and select which user has to answer which question.
Now I want to write a system that reminds (Email) a user after a certain amount of time that his question hasn’t been answered, and that he should answer it.
So, I need to check my database every ~30 minutes and see if this “answertime” has run out, and send the user an email.
I don’t think I can achieve this with an PHP-Script unless there is a way to always run a script in the background. I also thought about writing an external program to check the database, but I don’t like using a program, that could fail without me noticing it.
So I wanted to ask, what’s the best way to do this?
You can set a
cron jobon the server side to run the php script every x minutesThis is for linux.
For windows you can set a scheduled task to run the script every x minutes