Drupal 8/9 publish or unpublish nodes of specific content type using cron
When the Drupal cron runs, the hook_cron() is triggered. As a result, we can define our task within this.
Example1: if there are any unpublished nodes present in the article content type, I want to publish them every time the cron runs.
Example2: if there are any published nodes present in the article content type, I want to unpublish them every time the cron runs.
Example1: if there are any unpublished nodes present in the article content type, I want to publish them every time the cron runs.
Example2: if there are any published nodes present in the article content type, I want to unpublish them every time the cron runs.
Share
share your add link
https%3A%2F%2Fmycode.blog%2Flakshmi%2Fdrupal-89-publish-unpublish-nodes-specific-content-type-using-cron%0A
Share in social
Comments