I have a situation where future events will be posted to the website in question. These future events are a content type with a date field using the date module.

I wish to automatically delete these events once their date has past. I'm assuming that rules should do this but I have searched and I am struggling to find a way to do this.

  • 1
    Is it important to delete or would un publishing be ok. If so check the 'scheduler' module.
    – Deejay
    Jan 6, 2015 at 6:37

1 Answer 1


You can use the hook_cron to solve your problem

function mymodule_cron(){

function _mymodule_delete_nodes(){
  //select all nodes from type X where date expired

See hook_cron for further information

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.