Flames Posted October 6, 2008 Share Posted October 6, 2008 I want a way to make a script that will automatically run at certain times accessing a MySQL DB e.g. on this forum a script runs every hour. I want it so that if you navigate to the file the script won't run but when it hits 12:00 it will run without anyone having to open the file and then again at 18:00 to run the file but slightly differently e.g. at 12:00 you get £100 and at 18:00 you get £50. I also want a method that will make a script run after 15 minutes of inactivity so it starts an internal php timer every time you load a page if the timer gets to 15 minutes (900 seconds) it will access a DB and log a user out and close the session. Anyway of doing this is much appreciated. Flames Link to comment https://forums.phpfreaks.com/topic/127282-making-a-php-script-that-will-run-at-certain-timesafter-certain-amount-of-time/ Share on other sites More sharing options...
ngreenwood6 Posted October 6, 2008 Share Posted October 6, 2008 I think that you are looking for a cron job. google it. Link to comment https://forums.phpfreaks.com/topic/127282-making-a-php-script-that-will-run-at-certain-timesafter-certain-amount-of-time/#findComment-658270 Share on other sites More sharing options...
trecool999 Posted October 6, 2008 Share Posted October 6, 2008 You may need to look up cron jobs. If you are using a shared server though, there is a chance it probably isn't supported without using an alternative. Link to comment https://forums.phpfreaks.com/topic/127282-making-a-php-script-that-will-run-at-certain-timesafter-certain-amount-of-time/#findComment-658276 Share on other sites More sharing options...
Flames Posted October 6, 2008 Author Share Posted October 6, 2008 Thanks both of you i found a good example of Cron Jobs in php and mysql and i checked my host and it has a GUI Cron that i can use. Link to comment https://forums.phpfreaks.com/topic/127282-making-a-php-script-that-will-run-at-certain-timesafter-certain-amount-of-time/#findComment-658277 Share on other sites More sharing options...
trecool999 Posted October 6, 2008 Share Posted October 6, 2008 No problem . Damn these shared servers... Link to comment https://forums.phpfreaks.com/topic/127282-making-a-php-script-that-will-run-at-certain-timesafter-certain-amount-of-time/#findComment-658310 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.