Reputation:
is it possible to do an automatic activity in php or wordpress website(using jquery,ajax or any thing else ) without opening the website.for example ,when i register a student with his email id in my website after 5 minutes the mail need to send the student telling his registration is done by the admin .I register the student then closed my website .After 5 minutes the mail is automatically go to student.
It is possible to check the current time and registration time and if difference between current time & registration time is 5 minutes then the mail is sent .But the problem here is this is working only when the website is open or correspond page is loaded.
So please help me to do this thing. [Automatic activity after a specific amount of time without opening the website ] .If you know how to that please provide an example.It will help me and others to do these things
Upvotes: 0
Views: 58
Reputation: 3156
Create a file, in which will use to send email, execute that file via cronjob , now you want to know how the file will know to which student it will send email , the simple answer is that there must be a status field in the database having value 0 by default. when a new user registered its value will be 0 and in you cronjob file the email will sent to those whose status value is 0 . after email sent update that status to 1 so that the crone file will not send email to that student again.
Upvotes: 1