Tsukiyomi Posted December 1, 2006 Share Posted December 1, 2006 I'm building a site where one of the features is that user can post listings of jobs which will be viewable for one month. After that month the listing will expire. I was wondering if there was a way to have a script run once a day automatically to go through and remove all the expired records in the database.Thanks in advance. Quote Link to comment Share on other sites More sharing options...
taith Posted December 1, 2006 Share Posted December 1, 2006 prolly the easiest way of doin this... is storing the date in a database asdate(z);then pull it out, if it doesnt equal today, run script, update database. Quote Link to comment Share on other sites More sharing options...
Tsukiyomi Posted December 1, 2006 Author Share Posted December 1, 2006 But how would I get it to do that in the first place? How would I get it to automatically look in the database on a regular basis and run this maintenance? Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted December 1, 2006 Share Posted December 1, 2006 you need to set a cron job. Quote Link to comment Share on other sites More sharing options...
Tsukiyomi Posted December 6, 2006 Author Share Posted December 6, 2006 [quote author=ToonMariner link=topic=116917.msg476679#msg476679 date=1164938498]you need to set a cron job.[/quote]Thank you, thats perfect. All I needed was the right term to research. Quote Link to comment 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.