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. Link to comment https://forums.phpfreaks.com/topic/29047-timed-events/ 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. Link to comment https://forums.phpfreaks.com/topic/29047-timed-events/#findComment-133104 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? Link to comment https://forums.phpfreaks.com/topic/29047-timed-events/#findComment-133109 Share on other sites More sharing options...
ToonMariner Posted December 1, 2006 Share Posted December 1, 2006 you need to set a cron job. Link to comment https://forums.phpfreaks.com/topic/29047-timed-events/#findComment-133120 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. Link to comment https://forums.phpfreaks.com/topic/29047-timed-events/#findComment-135828 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.