{"id":42863974,"url":"https://github.com/wkentdag/payload-plugin-scheduler","last_synced_at":"2026-01-30T12:42:38.969Z","repository":{"id":233723204,"uuid":"786786869","full_name":"wkentdag/payload-plugin-scheduler","owner":"wkentdag","description":"PayloadCMS v2 plugin for scheduled posts","archived":false,"fork":false,"pushed_at":"2024-10-16T18:51:25.000Z","size":359,"stargazers_count":26,"open_issues_count":4,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-02T04:14:27.238Z","etag":null,"topics":["node-schedule","payload-plugin","payloadcms","scheduler"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/payload-plugin-scheduler","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wkentdag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-15T09:54:59.000Z","updated_at":"2025-07-09T21:28:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"ac41616a-dc83-4c00-bef1-d0e1558a0fd7","html_url":"https://github.com/wkentdag/payload-plugin-scheduler","commit_stats":{"total_commits":66,"total_committers":1,"mean_commits":66.0,"dds":0.0,"last_synced_commit":"84977e5179c2d7881a7834fa2280f16085ede048"},"previous_names":["wkentdag/payload-plugin-scheduler"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/wkentdag/payload-plugin-scheduler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkentdag%2Fpayload-plugin-scheduler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkentdag%2Fpayload-plugin-scheduler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkentdag%2Fpayload-plugin-scheduler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkentdag%2Fpayload-plugin-scheduler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wkentdag","download_url":"https://codeload.github.com/wkentdag/payload-plugin-scheduler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkentdag%2Fpayload-plugin-scheduler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28912915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["node-schedule","payload-plugin","payloadcms","scheduler"],"created_at":"2026-01-30T12:42:38.341Z","updated_at":"2026-01-30T12:42:38.959Z","avatar_url":"https://github.com/wkentdag.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# payload-plugin-scheduler\n\nPayload plugin that enables scheduled publishing for draft-enabled collections, inspired by wordpress post scheduler.\n\n![ci status](https://github.com/wkentdag/payload-plugin-scheduler/actions/workflows/test.yml/badge.svg)\n\n## Installation\n\n```sh\nnpm i payload-plugin-scheduler\n```\n\n## Usage\n\n```ts\n// payload.config.ts\n\nimport { buildConfig } from 'payload/config'\nimport { ScheduledPostPlugin } from 'payload-plugin-scheduler'\nimport Pages from './collections/Pages'\nimport Posts from './collections/Posts'\nimport Home from './globals/Home'\n\nexport default buildConfig({\n  collections: [Pages, Posts],\n  globals: [Home],\n  plugins: [\n    ScheduledPostPlugin({\n      collections: ['pages', 'posts'],\n      globals: ['home'],\n      interval: 10,\n    })\n  ]\n  // ...more config\n})\n\n```\n\n## Options\n\nAt least one collection / global is required.\n\n### `collections?: string[]`\n\nAn array of collection slugs. All collections must have drafts enabled.\n\n### `globals?: string[]`\n\nAn array of global slugs. All globals must have drafts enabled.\n\n### `interval?: number`\n\nSpecify how frequently to check for scheduled posts (in minutes).\nThis value will also be passed to the `DatePicker` component. Defaults to 5 mins.\n\n\n### `scheduledPosts?: Partial\u003cCollectionConfig\u003e`\n\nCustom configuration for the scheduled posts collection that gets merged with the defaults.\n\n\n## Utils\n\n### `SafeRelationship`\n\nDrop-in replacement for the default [`relationship` field](https://payloadcms.com/docs/fields/relationship) to prevent users from publishing documents that have references to other docs that are still in draft / scheduled mode.\n\n```ts\nimport type { Field } from 'payload'\nimport { SafeRelationship } from 'payload-plugin-scheduler'\n\nconst example: Field = SafeRelationship({\n  name: 'featured_content',\n  relationTo: ['posts', 'pages'],\n  hasMany: true,\n})\n```\n\n## Approach\n\nIn a nutshell, the plugin creates a `publish_date` field that it uses to determine whether a pending draft update needs to be scheduled. If a draft document is saved with a `publish_date` that's in the future, it will be scheduled and automatically published on that date.\n\n### `publish_date`\n\nDatetime field added to enabled collections. Custom `Field` and `Cell` components display the schedule status in the client-side UI.\n\n### `scheduled_posts`\n\nCollection added by the plugin to store pending schedule updates. Can be customized via `scheduledPosts` option.\n\n### Cron\n\nA configurable timer checks for any posts to be scheduled in the upcoming interval window. For each hit, it creates a separate job that's fired at that document's `publish_date` (via [node-schedule](https://github.com/node-schedule/node-schedule)). The idea here is that you can configure your interval window to avoid super long running tasks that are more prone to flaking.\n\n\n## Caveats\n\n* This plugin doesn't support Payload 3.0 beta. I intend to update it once 3.0 is stable, but it'll require substantial re-architecting to work in a serverless environment.\n\n* There's no logic in place to dedupe schedules across multiple instances of a single app (see https://github.com/wkentdag/payload-plugin-scheduler/issues/9)\n\n* There's no logic in place to automatically publish any pending scheduled posts that weren't published due to server downtime. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwkentdag%2Fpayload-plugin-scheduler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwkentdag%2Fpayload-plugin-scheduler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwkentdag%2Fpayload-plugin-scheduler/lists"}