There is one key thing to keep in mind when it comes to scheduled (un)publishing: Sitecore refreshes (auto-publishes) once every night. That means you can schedule what day a page or widget goes on or offline, but cannot specify an exact time (because that time is just the one time at night).
Scheduling to go offline
This one's pretty straightforward. You can plan for a page, as well as a widget, to go offline on a certain day. Just set the Unpublish date (and publish your item as usual) and you're done:
Scheduling to go online
This one is a bit trickier. You can schedule a new page or widget to go online using the same method as above (obv setting the Publish date instead of the Unpublish date).
Scheduling an existing page or widget item to go online in the future however is not possible. Because, when Sitecore auto-publishes tonight and sees the Publish date is set to a date in the future, it will take the item entirely offline, because the Publish date hasn't been reached yet.
So far so good?
So what is possible when you want to schedule an update of a page to go online at a future date? This is possible in templates that have versions. Such as an Editorial Article page and News page. You can schedule for a specific version to go online at a future date. CAVEAT: Sadly the header image is not attached to a specific version so that cannot be updated.
- Update your article.
- Check the version number in the top right of the Content Editor (in this screenshot it's version 123):
- Go to Publish > Change [Restrictions]
- Scroll to the end of the list
- Fill in the 'Publishable from' and 'Publishable to' dates for your new version. No need to fill in time, it will set to 12:00 automatically.
- Important: The 'Publishable from' date will be the day before you want your page to go online! Ex: if you want your update to be live on Friday, set the date to Thursday. Remember, Sitecore auto-updates every night, so Thursday night it will have passed the Thursday 12:00 mark and therefore publish the version. Were you to have set the date to Friday, Sitecore wouldn't see Friday 12:00 until the next auto-publish that Friday night, effectively putting your update online too late.
- When first setting up, also fill in the 'Publishable to' date in your second-to-last version:
- Make sure you approve the page!
- Finally: Publish your page so new settings take effect. NOTE: don't publish the page if you've scheduled for it to go online the next day!
Why would I want to do all this?
To keep content updated! To not have to remember to take something offline! To get things done ahead of time! To not worry that no one will be in to publish your item on a specific date!
- Scheduled publishing has been added to the Amsterdam Weekend Guide workflow in Dutch. Someone writes it in the week and schedules for it to go online Friday when nobody from their team is in to publish it.
- Sponsored posts can be given an Unpublish date when we know how long the agreement is with the sponsor.
- Events and seminars listed in widgets can be set-up with an unpublish date so the widget item goes offline the day of or after the seminar, such as: https://www.iamsterdam.com/en/our-network/in-amsterdam/international-newcomers/in-amsterdam-seminars (the cards will shift over - no gaps!)
- Video tips in the slider on https://www.iamsterdam.com/nl/uit/blijf-op-de-hoogte/uitmail/video all have an unpublish date set to the day after the event has taken place.