Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Scheduled content publishing on your Drupal 8 site with the Scheduler module

Parent Feed: 

High-quality content is a huge business booster. However, its creation takes time and effort. You will need to publish content regularly in order to keep your website fresh, maintain your SEO rankings, and keep your audience engaged.

Luckily, there are ways and tools to facilitate regular content production. Consider, for example, the idea of scheduled publishing on your website. We will discuss its benefits here and take a look at a great scheduling tool — the Scheduler module for Drupal websites.

The idea of scheduled publishing for your website

Scheduled publishing means that you or your content creators will be able to:

  • have content automatically published at predefined dates and times
  • have content automatically deleted at predefined dates and times

Scheduled publishing benefits and use cases

Scheduling tools can make your publishing workflows better organized, more flexible, and time-saving. Here is how:

  • You can quickly post plenty of content in advance with no need to stay tied to the PC. Your content can be scheduled to appear on non-working hours, weekends, special dates, during your vacation or business trip, etc.
  • With scheduling tools, you don’t have to worry about the outdated content clean-up — you can just schedule it for deletion in advance, based on how long it is relevant.
  • Scheduling helps you automatically run marketing campaigns with specific start and end dates. They can be tied to your product launches, holidays, seasons, etc.

Marketing campaigns based on holidays

The Scheduler module for scheduled publishing in Drupal 8

The Scheduler module does its job of publishing and unpublishing your Drupal nodes perfectly. It can work, for example, as a future blog post scheduler for your website. The module has overall 1,250,000 downloads irrespective of the version, which proves how popular scheduling is. Let’s take a closer look at what it offers in the Drupal 8 branch.

The Scheduler module installation

The Scheduler comes with a submodule — the Scheduler Rules Integration. If you enable it as well, your scheduled publishing can reach an especially high level (based on particular conditions via the Rules Drupal module). Let’s keep it simple this time and discuss the classic scheduled publishing only.

Scheduler Drupal module installation

Enabling scheduled publishing & unpublishing for a content type

You will need to go to the necessary content type (article, news, gallery, product, etc.) and enable the scheduling feature for it in Structure — Content types — [Your content type] — Edit. Check the boxes for enabling scheduled publishing and unpublishing.

More options will now be available. Among the most interesting ones are:

  • changing the node creation time to match the scheduled publishing time — this will make your Drupal content look fresher making
  • making scheduled publishing required — this will make sure your editors don’t forget to schedule the nodes

Enabling scheduled publishing & unpublishing for a content type with the Drupal Scheduler module

On the same tab, you can specify the scheduling layout — a vertical tab or a separate fieldset. This is how it will appear to your editors.

The date-only format as an option for the Scheduler

To facilitate scheduled publishing, you can choose to make only the date schedulable. Your editors will not have to regularly enter the exact time. The time will be a default, but they will be able to change it if needed. The date-only option is a general one and can be enabled at Configuration — Content authoring — Scheduler.

Date-only format with the Drupal Scheduler module

Scheduling your Drupal 8 content to be published or unpublished

Now let’s see how the scheduled publishing looks during your Drupal node creation. To the right of the node editing form, there is now the “Scheduling options” tab. Enter the publishing and unpublishing date and time or leave either of them blank if you do not need them. The time is tied to your website’s time zone.

Scheduling your Drupal 8 content to be published or unpublished

We have scheduled the post “Congrats on the first day of spring!” for March 1, 2020, at 7.00 AM. It should appear on March 1 and disappear the next day.

Content scheduled for publishing in Drupal

You now also have a “Scheduled” tab that shows all your nodes that are currently scheduled for publishing or unpublishing.

Scheduled content tab from the Drupal Scheduler module

Lightweight Cron as the Scheduler task manager

What if the time has come but your scheduled articles or other nodes have not yet appeared? This means that the Cron hasn’t yet run. The Drupal Scheduler module relies on the Cron for the automatic publishing and unpublishing of your nodes at regular, preconfigured intervals. Every time the Cron runs and discovers the scheduled nodes, it publishes or unpublishes them.

You can choose to use the Lightweight Cron created specifically for the Scheduler. It allows you to make more granular settings as to the frequency of running the Scheduler tasks and avoid overloading the Drupal Cron.

The Lightweight Cron settings are found at Configuration — Content authoring — Scheduler. You can run it at any minute on-demand with one button to see the due tasks immediately completed. You can also make granular frequency settings in the Crontab tool on your website’s server. Contact our Drupal support team at any time for help.

Lightweight Cron as the Scheduler task manager

Set up scheduled publishing with us!

Does the scheduled publishing idea look interesting to you? Or maybe you would like to try other ways and tools for easy Drupal content workflows? Drupal 8 now offers plenty of options in this area, some of which are included in the Drupal core of the recent versions.

For scheduled publishing or any other Drupal website feature, you can always rely on our Drupal development and support experts!

Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web