UrbanDweller Posted May 11, 2012 Share Posted May 11, 2012 Hey all, Im currently working on a site which I save a cookie on users computer for 1 month as well a row in a table with the 1 month expiring date plus cookie id. What I would like to know is if theres a way to make the server check the table every day at say 12pm to see if any corresponding user cookies in each row have expired on that day as to remove them from the table to match the expiring cookie on the users computer? I would like not to have to rely on a user/admin accessing in to make a script run instead have something thats timed to go off automatically instead? Is there anyway of doing this? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/262395-automaticly-remove-table-rows-daily-if-logged-date-has-expired/ Share on other sites More sharing options...
trq Posted May 11, 2012 Share Posted May 11, 2012 You would need to setup cron to execute your query daily. Nothing really to do with PHP. Quote Link to comment https://forums.phpfreaks.com/topic/262395-automaticly-remove-table-rows-daily-if-logged-date-has-expired/#findComment-1344724 Share on other sites More sharing options...
UrbanDweller Posted May 11, 2012 Author Share Posted May 11, 2012 Could you expand on cron or give a url? Quote Link to comment https://forums.phpfreaks.com/topic/262395-automaticly-remove-table-rows-daily-if-logged-date-has-expired/#findComment-1344729 Share on other sites More sharing options...
Jessica Posted May 11, 2012 Share Posted May 11, 2012 http://lmgtfy.com/?q=cron Quote Link to comment https://forums.phpfreaks.com/topic/262395-automaticly-remove-table-rows-daily-if-logged-date-has-expired/#findComment-1344739 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.