Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

JackD's avatar
Level 6

Delete from record if date matched the expiration

Hi,

I have items in my database record with expiration date, how can i automate it to delete the record that matched the current date to its expiration?

thanks

0 likes
2 replies
willvincent's avatar

You probably should run a cronjob for that, but you don't necessarily need to run a cronjob for it. You could manage it as part of a page request.. in the event you're hosting on a terrible host that doesn't allow cron jobs to be setup for example.

Please or to participate in this conversation.