I've site on Drupal 8.1.x with many nodes (over 200). That node type is articles. Some nodes are old (written last year, for example) and have non actuality content with attach files (photos).

How to make easy way to delete old (older than 30 days from today) nodes of one type (name articles) with all attachments (photos) after run Drupal Cron (for example, time to run Cron is every week)?

Write custom module or use hook_cron() or something else?

Any working examples helps me to understand. Thanks!

  • A custom module with a hook_cron implementation would be the easiest, yes. I couldn't think of site-building recipe to do this in D8. Commented Jun 11, 2016 at 20:07


Browse other questions tagged or ask your own question.