I have some data that are inserted to database after form submit. After they are inserted to databse I need to sed that data to email but I have to wait 5 minutes before I send them.
Is there anyway that I can wait for 5 minutes with, let say with sleep function. I do not want user to wait 5 minutes for script to be executed.
This is what I am thinking:
1) submit form and insert data to db
2) send inserted row id to some other script that runs somehow on server as process
3) after 5 minutes send email with script that is run as a process
4) if there is more then let say 50 ids on hold fire up new process and do steps from 3-4 again.
This is just what I am thinking.
I have no idea where to start.
Please give me some directions. I do not need redy to use solution.
I do not want to use cron job!!!