Studio customization
Structure builder
Was this page helpful?
Schedule your content for future publication and organize upcoming releases – no custom tasks or serverless functions required!
Scheduled publishing has been deprecated as of October 2025.
We recommend moving to Scheduled drafts for scheduling individual documents, or Content Releases for building coordinated releases.
Scheduled Publishing is not enabled by default. It can be enabled in the config by setting scheduledPublishing: { enabled: true }. Inversely, you can remove or disable the feature by setting enabled to false or removing the configuration setting.
Scheduled Publishing uses the Sanity Scheduling API which is available on Growth plans and above.
If you are starting from scratch, skip the following section on uninstalling the plugin and cleaning up old configuration and jump directly to the next section on how to configure or disable Scheduled Publishing.
If you are already using Scheduled Publishing plugin, the first step is to get rid of it and update your studio to the latest release. If you already updated your studio you might have gotten an alert about this.
Run the following command in your project root to uninstall the plugin:
npm uninstall @sanity/scheduled-publishing
Next, remove the plugin from your studio configuration. Typically you'll find this in ./sanity.config.ts|js. Find and delete the following lines from your configuration:
import {scheduledPublishing} from '@sanity/scheduled-publishing'
export default defineConfig({
// ...
plugins: [
scheduledPublishing()
],
})Your plugin declaration might be a bit more expansive if you've defined a custom time format for the plugin. Delete it all!
import {scheduledPublishing} from '@sanity/scheduled-publishing'
export default defineConfig({
// ...
plugins: [
scheduledPublishing({
inputDateTimeFormat: 'MM/dd/yyyy h:mm a',
}),
],
})You might also have defined some custom document actions and badges to support Scheduled Publishing. You can keep these around, and they'll continue to work after migrating to the core studio functionality. Refer to the section on document actions and badges further on in this article.
Note that while very similar to the plugin config this goes into the top-level of your studio configuration. Setting enabled to false will opt you out of using scheduled publishing for the project.
import {defineConfig} from 'sanity'
defineConfig({
// ....
scheduledPublishing: {
enabled: true,
inputDateTimeFormat: 'MM/dd/yyyy h:mm a',
}
)As before, you can add a custom time format if you so wish. If left unspecified, the format will default to dd/MM/yyyy HH:mm.
You can further enhance your Scheduled Publishing experience with custom document actions and badges.
This example assumes you've customized your document actions and would like to only show the Schedule button on movie documents only.
The Schedule document action allows users to both create and edit existing schedules directly from the form editor. It is added to all document types by the plugin, so you should remove it from types that should NOT have it.
import {defineConfig, ScheduleAction} from 'sanity'
export default defineConfig({
// ...
document: {
actions: (previousActions, {schemaType}) => {
/*
* Please note that this will only alter the visibility of the button in the studio.
* Users with document publish permissions will be able to create schedules directly
* via the Scheduled Publishing API.
*/
if (schemaType.name !== 'movie') {
// Remove the schedule action from any documents that is not 'movie'.
return previousActions.filter((action) => action !== ScheduleAction)
}
return previousActions
},
},
})Note that ScheduleAction is now imported from the core sanity package.
This example assumes you've customized your own document badges and would like to only show the Scheduled badge on movie documents.
The Scheduled document badge indicates whether the current document is scheduled and, if so, when it will be published. It is added to all document types by the plugin, so you should remove it from types that should NOT have it.
import {defineConfig, ScheduledBadge} from 'sanity'
export default defineConfig({
// ...
document: {
badges: (previousBadges, {schemaType}) => {
if (schemaType.name !== 'movie') {
// Remove the schedule badge from any documents that aren't 'movie'.
return previousBadges.filter((badge) => badge !== ScheduledBadge)
}
return previousBadges
},
},
})Note that ScheduleBadge is now imported from the core sanity package.
Schedules sit adjacent to your dataset and can be managed using the Scheduling API (which this plugin does for you).
Schedules are a unique resource and are linked to, but do not exist within your Sanity project and dataset. It's important to understand the following behavior:
sanity dataset export will not include schedules and sanity dataset import does not support importing schedules.More information can be found in the Scheduling API article.
Yes. Documents scheduled to publish in future will do so, even if they contain validation errors. This also applies to scheduled documents that you manually opt to publish immediately via the tool.




npm uninstall @sanity/scheduled-publishingimport {scheduledPublishing} from '@sanity/scheduled-publishing'
export default defineConfig({
// ...
plugins: [
scheduledPublishing()
],
})import {scheduledPublishing} from '@sanity/scheduled-publishing'
export default defineConfig({
// ...
plugins: [
scheduledPublishing({
inputDateTimeFormat: 'MM/dd/yyyy h:mm a',
}),
],
})import {defineConfig} from 'sanity'
defineConfig({
// ....
scheduledPublishing: {
enabled: true,
inputDateTimeFormat: 'MM/dd/yyyy h:mm a',
}
)import {defineConfig, ScheduleAction} from 'sanity'
export default defineConfig({
// ...
document: {
actions: (previousActions, {schemaType}) => {
/*
* Please note that this will only alter the visibility of the button in the studio.
* Users with document publish permissions will be able to create schedules directly
* via the Scheduled Publishing API.
*/
if (schemaType.name !== 'movie') {
// Remove the schedule action from any documents that is not 'movie'.
return previousActions.filter((action) => action !== ScheduleAction)
}
return previousActions
},
},
})import {defineConfig, ScheduledBadge} from 'sanity'
export default defineConfig({
// ...
document: {
badges: (previousBadges, {schemaType}) => {
if (schemaType.name !== 'movie') {
// Remove the schedule badge from any documents that aren't 'movie'.
return previousBadges.filter((badge) => badge !== ScheduledBadge)
}
return previousBadges
},
},
})