decap-cms
decap-cms copied to clipboard
Feature Request: Scheduled posts
This would be a great addition
Serverless has a nice way to do scheduled posts. This would be a great addition to the CMS, but would require some sort of AWS connection, which does not currently exist.
Starting this discussion in hopes that it will get added to an eventual feature roadmap.
https://serverless.com/blog/static-site-post-scheduler/
Would like to see this too. Another feature that is relied on for those migrating from the WordPress community.
I think the scheduler linked in the OP is a great approach. For our purposes, we should probably use metadata instead of PR comments. At a minimum, implementing this in the CMS would require:
- A UI for post scheduling that:
- is obvious in purpose and state
- is (probably) accessible through the editor toolbar
- allows a date/time to be set
- A backend method that adds post schedules to metadata
- Associated state management - namely ensuring the new data is included in the entry model
This could all be eventually accomplished via higher level abstractions, maybe some sort of Events API, but we're not there yet. Getting this in place can at least help inform such abstractions in the future. Another future improvement is backends-as-plugins, which could also be used within serverless functions like this.
Thoughts?
The biggest barrier I see to this is actually posting the scheduled post without having the CMS open. Since we run in-browser only, there is no actual server to run the post. @erquhart Are you planning on actually using the Serverless stack, or is there another idea you had on this?
Right, Netlify CMS has no way to handle this itself. The OP example would use a Lambda function running a cron job, just as the linked article describes.
@erquhart could we do something with Netlify functions now that that's a thing?
You'd need to schedule the function call from the CMS somehow. Not sure how that would work, even if you include a scheduling service like Zapier.
Sent with GitHawk
i feel like something along the lines of https://www.nczonline.net/blog/2018/03/scheduling-jekyll-posts-netlify/ would work, although probably not with Netlify functions since it needs CloudWatch for the cron.
Ideally, every asset (a post, a page, an image, etc) would have the ability to be scheduled. Atomic scheduling.
Is anyone already working on this?
If not, I can contribute.
That'd be great - what do you have in mind?
Waiting for some news about this
Me too lol
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Please, stay open.
This is a fantastic idea. What if we somehow used GitHub actions in the users repo to accomplish this? (See this post around how something like this might be accomplished)
I am happy to add this into the v3 UI mocks to show you how it might look visually if this is something we are looking into doing.
This is a fantastic idea. What if we somehow used GitHub actions in the users repo to accomplish this?
This is a very good thought. I think the CMS could provide a UI over different services CI pipelines (where available) and auto generate flows to support scheduling.
For those looking for solutions in the meantime, if you have CI with scheduled workflow/builds (CircleCI & Travis), one idea to set up without Zapier:
- schedule a repeating CI build every AM (or every hour)
- have a "Scheduled Post Time" input field where user enters future date/time
- check date/time before running
createPageor whatever page building function to build all posts (so post /pages only build when date/time is in past)
Just wanted to add another example I came across where someone is using GitHub Actions co accomplish this task.
Based on what @papistan said, I was thinking about a very similar idea for GitLab. One could hypothetically schedule a pipeline for ever X interval which has a single Job that looks at some criteria (perhaps a yml file in each Merge Request branch) and merges any branches that are ready to be published.
Is there any news on this one? Having a use case where scheduled blog posts would relieve a lot of pain points.
- Any news guys? Really need this!