Poddy Posted April 29, 2008 Share Posted April 29, 2008 Hi i need to run code that makes mysql fields expire and delete them.. is this possible? i saw a script that uses current date and add date functions to enter into mysql fields, but i believe a script is required to actually make sure they are not expired.. the issue here is that i am taking data from facebook which i am only allowed to keep for 24 hours aka 1 day and if no ones accesses the page for more than a day i am violating the terms.. the only thing i need is the way to activate a script without user interface... unattended thanks in advance, Poddy Link to comment https://forums.phpfreaks.com/topic/103439-solved-running-a-script-without-actually-entering-a-page/ Share on other sites More sharing options...
SharkBait Posted April 29, 2008 Share Posted April 29, 2008 If you have a date field in the database that stores the info you could check to see if it's greater than 24hrs old and if so delete it. To automate it you could call the php via a Cronjob on your web host. Link to comment https://forums.phpfreaks.com/topic/103439-solved-running-a-script-without-actually-entering-a-page/#findComment-529694 Share on other sites More sharing options...
rhodesa Posted April 29, 2008 Share Posted April 29, 2008 Yeah, just create a PHP script that cleans up the MySQL when you run it, and schedule it to be automatically executed every 10min/hour/whatever via a Cronjob(Linux) or a Scheduled Task(Windows) Link to comment https://forums.phpfreaks.com/topic/103439-solved-running-a-script-without-actually-entering-a-page/#findComment-529733 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.