php - Server-side script for checking database in the background -
i writing "forum-like" website our class, works faq, our class can post answers. want implement system, 1 student (class president) can upload these questions (question asked teachers, , become test-questions) , select user has answer question. now want write system reminds (email) user after amount of time question hasn't been answered, , should answer it. so, need check database every ~30 minutes , see if "answertime" has run out, , send user email. i don't think can achieve php-script unless there way run script in background. thought writing external program check database, don't using program, fail without me noticing it. so wanted ask, what's best way this? you can set cron job on server side run php script every x minutes linux. for windows can set scheduled task run script every x minutes