Schedules unpublished Orchard Core content for automatic publication. Covers PublishLaterPart, scheduled UTC dates, time zone conversion, programmatic scheduling, background task, and admin list display.
Ships in orchardcore. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an Orchard Core expert. Generate content definitions and integration code for publishing an unpublished latest version when its scheduled time arrives.
OrchardCore.PublishLater feature. Its module dependency is OrchardCore.Contents.PublishLaterPart to each content type that editors may schedule.PublishLaterPart.ScheduledPublishUtc is a nullable UTC DateTime. The editor converts the editor's local date and time through ILocalClock (user time zone when User Time Zone is enabled, else site time zone, else server time zone). Local times skipped or repeated by a daylight-saving transition fail conversion and the schedule is not saved.PublishContent permission (with owner and per-type variants) to set or cancel the schedule. There is no dedicated permission, and custom endpoints must authorize themselves.ScheduledPublishingBackgroundTask (title Scheduled Content Items Publisher) as an IBackgroundTask. Its schedule is * * * * *, so due content is checked every minute. Publication can happen after, never before, the scheduled time, and only while the tenant is running.IContentManager.PublishAsync, handlers, workflows, indexing, and notifications run as for a manual publish. A handler can still cancel publication.PublishLaterPart_SummaryAdmin: Meta:25 in the List layout (SummaryAdmin) and Modified:25 in the Grid layout (SummaryAdminGrid). The editor shape PublishLaterPart_Edit is placed at Actions:25 (it was Actions:10 before the 4.0 action bar order: Cancel and Delete first, then Preview, Archive Later at Actions:20.5, Publish Later, and Publish last at Actions:40).PublishLaterPartIndex for latest, unpublished items whose scheduled UTC time is earlier than the current UTC clock value.ScheduledPublishUtc, applies the part, then calls IContentManager.PublishAsync.{ "steps": [...] } format.sealed modifier, except View Models.{
"steps": [
{
"name": "Feature",
"enable": [
"OrchardCore.PublishLater"
],
"disable": []
}
]
}
using OrchardCore.ContentManagement.Metadata;
using OrchardCore.Data.Migration;
using OrchardCore.PublishLater.Models;
namespace MyModule;
public sealed class Migrations : DataMigration
{
private readonly IContentDefinitionManager _contentDefinitionManager;
public Migrations(IContentDefinitionManager contentDefinitionManager)
{
_contentDefinitionManager = contentDefinitionManager;
}
public async Task<int> CreateAsync()
{
await _contentDefinitionManager.AlterTypeDefinitionAsync("NewsArticle", type => type
.Creatable()
.Draftable()
.Versionable()
.WithPart("TitlePart")
.WithPart(nameof(PublishLaterPart), part => part.WithPosition("10")));
return 1;
}
}
{
"steps": [
{
"name": "ContentDefinition",
"ContentTypes": [
{
"Name": "NewsArticle",
"DisplayName": "News Article",
"Settings": {
"ContentTypeSettings": {
"Creatable": true,
"Draftable": true,
"Versionable": true
}
},
"ContentTypePartDefinitionRecords": [
{
"PartName": "TitlePart",
"Name": "TitlePart"
},
{
"PartName": "PublishLaterPart",
"Name": "PublishLaterPart",
"Settings": {
"ContentTypePartSettings": {
"Position": "10"
}
}
}
]
}
]
}
]
}
Persist the scheduled instant as UTC. A scheduled item should normally be latest and unpublished.
{
"steps": [
{
"name": "Content",
"data": [
{
"ContentItemId": "[js:uuid()]",
"ContentType": "NewsArticle",
"DisplayText": "Conference announcement",
"Latest": true,
"Published": false,
"TitlePart": {
"Title": "Conference announcement"
},
"PublishLaterPart": {
"ScheduledPublishUtc": "2026-09-01T09:00:00Z"
}
}
]
}
]
}
// draft must be the latest unpublished version of a type with PublishLaterPart.
draft.Alter<PublishLaterPart>(part => part.ScheduledPublishUtc = scheduledUtc);
await _contentManager.SaveDraftAsync(draft);
Convert a local value with ILocalClock.ConvertToUtcAsync first. Set the property to null to cancel.
The built-in editor shape appears in the content editor action zone and uses PublishLaterPartViewModel:
| Property | Purpose |
|---|---|
ScheduledPublishLocalDateTime | Local value bound from the editor. |
ScheduledPublishUtc | Stored UTC value for display and scheduling. |
ContentItem | The content item being edited. |
Submitting the cancel action or an empty local date clears the schedule. Do not set a local time directly on PublishLaterPart; convert it to UTC first.
Use the map index for administrative or reporting queries. Restrict the query to the latest unpublished version.
using OrchardCore.PublishLater.Indexes;
using YesSql;
namespace MyModule.Services;
public sealed class ScheduledPublicationQuery
{
private readonly ISession _session;
public ScheduledPublicationQuery(ISession session)
{
_session = session;
}
public Task<IEnumerable<PublishLaterPartIndex>> GetDueItemsAsync(DateTime utcNow)
{
return _session
.QueryIndex<PublishLaterPartIndex>(x =>
x.Latest &&
!x.Published &&
x.ScheduledPublishDateTimeUtc < utcNow)
.ListAsync();
}
}
ScheduledPublishingBackgroundTask publishes each due latest version independently. It obtains the latest item, clears its schedule, logs at debug level, and publishes it. The PublishLaterPartIndexProvider excludes already published or non-latest versions and removes stale indexes when the part is removed from a type definition.
| Symptom | Check |
|---|---|
| No scheduling controls | Enable the feature and attach PublishLaterPart to the content type. |
| Content is not published | Verify it is latest, unpublished, and its UTC time has passed. |
| Time is offset | Store and compare UTC values; let the built-in editor use ILocalClock. |
| Old item is published | Confirm an editor did not create a newer draft after scheduling the item. |
| Some due items stay drafts | An exception while publishing one item stops the current run; fix the failing handler, the next run retries. With the Background Tasks feature enabled, check the task is enabled in the /Admin/BackgroundTasks list. |
| Schedule not saved near a DST change | Choose an unambiguous local time. |
What SKILL.md sets; muted values are Claude Code's defaults
/orchardcore:orchardcore-publish-laterfrom orchardcore
npx claudepluginhub crestapps/crestapps.agentskills --plugin orchardcore140 skills in this plugin
/orchardcore-adminGuidance for the Orchard Core admin panel, including admin controllers and routes, admin menu registration with AdminNavigationProvider, ocat editor forms grouped in cards, admin pages rendering Model.Editor, the UI text casing standard, TheAdmin layout and menu colors, admin branding, the Navbar shape, the Ctrl+K quick navigation palette and QuickNavigationSource, AdminSettings such as MenuBehavior, ShowBreadcrumb, DisplayQuickNavigation, DisplayTitlesInTopbar and ActionsLayout, the AdminDashboard shape, settings pages, and admin filters and zones. Use this skill when requests mention the Orchard Core admin panel, TheAdmin, admin controllers, admin menu registration, an icon on an admin menu item, the AdminSettings recipe step, quick navigation, navigation menu behavior, the admin URL prefix, UI text casing. Strong matches include OrchardCore.Admin, AdminSettings, AdminPermissions, AdminOptions, AdminAttribute, SiteDisplayDriver, IDisplayManager./orchardcore-admin-dashboardSkill for creating admin dashboard widgets in Orchard Core. Covers the DashboardWidget stereotype, DashboardPart position and sizing, the built-in HtmlDashboardWidget, ContentsMetadata and ContentsTags widget types, custom widget content types via recipe or migration, arranging widgets in Manage Dashboard mode, widget template customization, provisioning widgets with recipes, dashboard permissions, the DashboardBreadcrumbProvider Dashboard ancestor, and the AdminDashboardContent shape used when the feature is disabled. Use this skill when requests mention Orchard Core Admin Dashboard, Create and Configure Dashboard Widgets, Enabling Admin Dashboard, Widget Configuration Properties, dashboard widget recipes, Dashboard breadcrumb, or related implementation, setup, or troubleshooting work. Strong matches include OrchardCore.AdminDashboard, DashboardPart, DashboardBreadcrumbProvider, AccessAdminDashboard, ManageAdminDashboard.Other plugins' skills for the same job