a quick question about Cron job

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
phanhuyen
Forum Newbie
Posts: 1
Joined: Tue Apr 10, 2018 9:22 pm

a quick question about Cron job

Post by phanhuyen »

Greetings PHP Technorati. I hope all is well. I come to you seeking more guidance on the subject of using a cron job to delete a mysql field entry 15 minutes after the entry is entered by the user. I haven't done this before, but should I use some sort of time expiration php script or leave it to the mysql cron job to run every 15 minutes, deleting new entries? Any thoughts on this matter as always is greatly appreciated. :banghead:

thanks in advance.

Batoe

.:To code or not to code is never the question!:. :?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: a quick question about Cron job

Post by Christopher »

I think the first question is why are you deleting field every 15 minutes. It might be better to timestamp the record and use that to do whatever you are trying to do. Maybe that is what you mean by "some sort of time expiration php script"?
(#10850)
Post Reply