I have a database table with lots of different times. if for example one row in the database shows 16:32pm today, then i need a code to be performed exactly when the minute turns 32 involving information in that row. I have thousands of rows, some points to the same exact time. The best idea i have in mind is activating a code every minute to check current time against the database and selecting the required rows. Is there a better way? If my question is not understandable, i can try to rephrase it, sorry for that.
yes, you can setup a cronjob for that..run that script let say every minute and compare the values in the rows with current time. i think that would do the job.
Here is my thoughts... The best idea I have in mind is activating a code every minute to check current time against the database and selecting the required rows. Yes that is the way. In this way you can get the code to be performed exactly when the minute turns 32 involving in that row. Let me know for more... call me @cattechnologies.com
and no need to worry about load - 1 query per minute isn't load for database, even if it is a complicated query
never experienced with cronjobs before but at first i'm trying to run it on my own computer using "task scheduler" of windows vista. I have a little problem because i set an editor to open my php files so when i put the file in task scheduler it opens it with the editor instead of a browser. it's not related to the forum but maybe someone know how to set the task scheduler to open the file with a specific software (browser in this case) ?
I haven't tried to do this specifically, but here's some conjecture... You can't tell Task Scheduler to open a .php script directly. It'll assume you want to edit the script, not execute it. Instead, you could tell Task Scheduler to open a browser window to the location of your php script. Or you could use the php executable (with your script as an argument) to execute it. - Walkere
Thanks.. didn't know "argument" is where i suppose to type the script's URL. IE only shows the script itself (the code) but FIREFOX works and runs the script, good enough...