By Dragoljub Ilic | Software Developer 24.10.2018.
Configure scheduled content publishing for Kentico MVC projects
Kentico, like any other Content Management System (CMS), provides full control over content to Content Editors, people whose daily job is to maintain content on websites. Kentico offers some helpful tools to Content Editors. Maybe the most helpful one is the possibility to schedule content (un)publishing. This feature enables Content Editors to prepare a piece of content in advance before it goes live. That is the responsibility of a scheduled task called Content publishing.
Managing the content tree in Kentico MVC projects, and portal engine projects are the same. Scheduled content publishing in Kentico MVC projects works fine, but for pages under workflow, this feature fails. So, what can we do to solve this problem?
My team and I, we started by recreating the Content publishing scheduled task. To enable scheduled content publishing in the MVC project, you must create a scheduled task manually. Start by opening the Scheduled tasks application, select your MVC website from a drop-down menu in the top left corner and click New task button (see image below).
The next step will be to configure the scheduled task with parameters as shown on the image below. Those parameters are the same as in a Content publishing task for portal engine projects.
You can run this task in a separate thread to improve the performance of a website, whch can be accomplished by marking the checkbox Run task in separate thread at the bottom of the page (see image below). After this, your scheduled task is ready for use and content will be (un)published by the scheduled task itself.
Important is that, like any other scheduled task, this one requires all CMS nodes in the web farm to be alive to make content scheduling valid, as well. This can be accomplished by changing settings on IIS level which will keep the application pool always on, or to use Kentico CMS Scheduler, which will execute tasks externally. The downside of Kentico CMS Scheduler is that it's available only under the Kentico EMS license.
If you're currently working on Kentico MVC projects and have applied a workflow or have a plan to do so, you need to keep in mind these things and configure your environment properly to avoid possible inconvenience in the future.
By Dragoljub Ilic | Software Developer 24.10.2018.Follow him on LinkedIn
Content editors often work on different environments of their company's website at the same time, and unfortunately, it happens that changes are done on the wrong environment. We might have a cure... Read more
By Drazen Janjicek | Principal Consultant 14.09.2018.
A few lines of code allow developers to interact with page types directly through the Pages application. For more implementation details, read our blog article. Read more
By Dragoljub Ilic | Software Developer 06.03.2018.