This article has not yet been verified against Umbraco 8.
The concepts and code examples might not work if you are running Umbraco 8.0 or a later version. If you are using Umbraco 7, this article is perfect for you!
You are more than welcome to report any issues found on the Documentation Issue Tracker.
Each document in Umbraco can be scheduled for publishing and unpublishing on a pre-defined date and time. In order to do this, go to the Info tab and find the Scheduled Publishing box in the right side. There you can select the exact date and time to publish and unpublish the current content item.
Your server may be in a different timezone then where you are located. As of Umbraco version 7.5, you are able to select a date and time in your local timezone and Umbraco will make sure that the item gets published at the selected time. So if you select 12PM then the item will be published at 12PM in the timezone you are in. This may be 8PM on the server, which is indicated when you select the date and time.
If you are in the same timezone as the server, this message will not appear under the date picker.
In Umbraco versions lower than 7.5, the time you select has to be the time on the server, these older versions of Umbraco do not detect your local timezone.
All users with access to the Content section in the Umbraco backoffice are able to schedule content for publish / unpublish.
In some cases you will need to adjust your configuration to ensure that scheduled publishing/unpublishing works. The schedule works by the server sending an HTTP(S) request to itself.
If you are in a load balanced environment special care must be given to ensure you've configured this correctly, see the docs here
If you are not load balancing, the way that Umbraco determines the base URL to send the scheduled HTTP(S) request to is as follows:
- umbracoSettings:settings/web.routing/@umbracoApplicationUrl if it exists (see these docs for details)
- Else umbracoSettings:settings/scheduledTasks/@baseUrl if it exits (deprecated)
- Else umbracoSettings:distributedCall/servers if we have the server in there (deprecated, see load balance docs)
- Else it's based on the first request that the website receives and uses the base url of this request (default)
umbracoApplicationUrl is used, the value also specifies the scheme (either http or https), however if any of the other options are used, then if the appSetting
umbracoUseSSL is set to
true, then the request for scheduled publishing will always be sent to the HTTPS endpoint
If your scheduled publishing/unpublishing is not working as you would expect it is most likely due to an issue that your server cannot communicate with the scheduled publishing endpoint. This can be caused by a number of reasons such as:
- Url rewrites in place that prevent the endpoint from being reached
- DNS misconfiguration not allowing the server to communicate to the base URL used in the first request that the website receives - which could be directly affected by a firewall/NAT/load balancer that your server sites behind
- SSL and/or umbracoUseSSL misconfiguration not allowing the server to communicate to the scheduled publishing endpoint on the correct http/https scheme
To better diagnose the issue you can temporarily change your log4net config settings to be DEBUG instead of INFO. This will give you all sorts of information including being able to see whether or not the scheduled publishing endpoint is being reached or not.
In some cases it might be easiest to specify the umbracoSettings:settings/web.routing/@umbracoApplicationUrl setting to ensure that your server is communicating to itself on the correct base url.