<p>To only disable an entry, use this:<a href="https://i.sstatic.net/GrdAN.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/GrdAN.png" alt="enter image description here" /></a></p>
<p>If entries need to be deleted, you can create a custom plugin, where entries will be deleted when expired or when the postdate is older than 2 weeks..</p>

CC BY-SA 4.0
2020-08-04T14:26:07.067Z
It has to actually be deleted, so a custom plugin will probably be the solution. Thank you very much!
Geestig
CC BY-SA 4.0
2020-08-03T15:22:38.910Z
2020-08-06T08:38:36.823Z
2020-08-06T08:38:36.823Z
Pavel Pavlovich
<p>I haven't found anything similar to this. But I was wondering if it's possible to delete certain entries after a certain time?</p>
<p>For example: User fills in form and adds contact entry - after 2 weeks this entry gets removed automatically. This way the database won't fill up, and the overview will stay clean.</p>
<p>I was thinking a cronjob every 24h that checks the postdate and when the postdate is over 2 weeks it gets removed. However I'm not sure if this is possible with craft cms?</p>

<entries><tasks><cron><delete>
How to automatically remove entries after a certain time?
# How to automatically remove entries after a certain time?

(Asked by: username_0 on 2020-08-03)

I haven't found anything similar to this. But I was wondering if it's possible to delete certain entries after a certain time?

For example: User fills in form and adds contact entry - after 2 weeks this entry gets removed automatically. This way the database won't fill up, and the overview will stay clean.

I was thinking a cronjob every 24h that checks the postdate and when the postdate is over 2 weeks it gets removed. However I'm not sure if this is possible with craft cms?

**Tags:** entries, tasks, cron, delete

---

## 1 answers

### Answer by username_1 on 2020-08-03. Score: 2

To only disable an entry, use this:[![enter image description here](https://i.sstatic.net/GrdAN.png)](https://i.sstatic.net/GrdAN.png)

If entries need to be deleted, you can create a custom plugin, where entries will be deleted when expired or when the postdate is older than 2 weeks..

> **Comments:**
> **username_0**: It has to actually be deleted, so a custom plugin will probably be the solution. Thank you very much!  

---

