wayne0126 Posted July 11, 2008 Share Posted July 11, 2008 I don't know if these were the right terms for the title but there is something I'm not sure about. Is there a way for a script to automatically execute by itself by the server without any involvement of a user? Say for example, "At 5:00 pm every day, the server will automatically add 1 new row of information to the database table. After 7 days, there should now be at least 7 rows within the table." I'm not sure if thats the lingo you guys use around here or if this is the style how to explain things. But really just what Im asking is if a server can perform a php script by itself at a certain time every day that will make some sort of change to the database without the influence of say an administrator. And also, if this is possible, will it be difficult to do, and what exactly would it look like to create something like this. Link to comment https://forums.phpfreaks.com/topic/114261-serverside-autoscripts-and-databases/ Share on other sites More sharing options...
ag3nt42 Posted July 11, 2008 Share Posted July 11, 2008 sure with a mixture of javascript and php.. or some ajax that seems very plauseable you'll basically make a webpage to leave up ALL THE TIME and use javascript or something similar to keep track of time.. everytime the clock hits that time use JS to fire a page.. and have the php code run off that page to make your entries into the database. Link to comment https://forums.phpfreaks.com/topic/114261-serverside-autoscripts-and-databases/#findComment-587518 Share on other sites More sharing options...
kenrbnsn Posted July 11, 2008 Share Posted July 11, 2008 If you're on Linux/Unix, you would run a cron job. Ken Link to comment https://forums.phpfreaks.com/topic/114261-serverside-autoscripts-and-databases/#findComment-587519 Share on other sites More sharing options...
ag3nt42 Posted July 11, 2008 Share Posted July 11, 2008 sry.. not much linux xp here :-\ Link to comment https://forums.phpfreaks.com/topic/114261-serverside-autoscripts-and-databases/#findComment-587524 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.