-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strapi: Allow scheduling content to be published / unpublished #2008
Conversation
See install instrictions here: https://market.strapi.io/plugins/strapi-plugin-publisher >The cron.enabled configuration option needs to be set to true in Server Configuration for the plugin to work. The plugin registers its own cron here: https://github.com/ComfortablyCoding/strapi-plugin-publisher/blob/0c84bb97a29cfe3da3be1321714d17b96e3ebed2/server/config/cron-tasks.js#L10-L11 Note: We are leveraging the default cron for now which is https://github.com/ComfortablyCoding/strapi-plugin-publisher/blob/0c84bb97a29cfe3da3be1321714d17b96e3ebed2/server/config/index.js#L8
Something was slightly off and complained. I removed the node modules dir and reinstalled. Everything is workign great now.
The time picker is a select with an option for each valid time If we use the default of 1 we end up with 24 hours * 60 mins = 1440 options! Let's limit it to 96 options (4 times an hour * 24 hours)
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📦 Next.js Bundle Analysis for @ifixit/commerce-frontendThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR 👏🏻 Nice work, glad it was simple! From a quick search I didn't see any other publishing plugins besides this one and the one mentioned in the issue, and I agree that this one looks better
QA 🌵 Then saved a new item and it magically changed: Note: You can add an item to be scheduled in the past (1 min ago) and the next cron tick will publish it. |
I decided to go with https://github.com/ComfortablyCoding/strapi-plugin-publisher as it is slightly more robust: More devs, longer lived, more releases, newer releases, more downloads etc
QA
cd backend/ && rm -rf .cache/ node_modules/ dist/
cd ../ && pnpm install:all
pnpm dev
strapi should allow schedulingBefore:
![image](https://private-user-images.githubusercontent.com/857362/272090176-06d17058-d280-44ed-aace-3088b85727b4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3MDA2NDcsIm5iZiI6MTcxOTcwMDM0NywicGF0aCI6Ii84NTczNjIvMjcyMDkwMTc2LTA2ZDE3MDU4LWQyODAtNDRlZC1hYWNlLTMwODhiODU3MjdiNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyOVQyMjMyMjdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iNDhhMmYyYzgzZmQxZWQ2NzA2OGY5MWNmNzE4MWRiNjM1ZmFkMmI1NmVkNzZjMzhlMWNhMTFhMDk0M2UyNmM3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.VqVX7jd5ELx0QgN5H5IJ1_qRhbSkOUFNHSlgSfX0edM)
Click save once, then you should see:
![image](https://private-user-images.githubusercontent.com/857362/272090332-5243b481-7c26-4fcf-8c07-0490286435d0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3MDA2NDcsIm5iZiI6MTcxOTcwMDM0NywicGF0aCI6Ii84NTczNjIvMjcyMDkwMzMyLTUyNDNiNDgxLTdjMjYtNGZjZi04YzA3LTA0OTAyODY0MzVkMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyOVQyMjMyMjdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mNDhmZjE2YmMyNDUxOWU3OTg0ZDhjNzQ0ZTVkZWRlNjE0NGE5MzA4MjM4YjlhMGEzZDQ4Nzg3NDhjNGQ4NGViJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.1Y9htSSObC82z2Bpl5mMP1N-wFIuTX3CZNM_Zp2idGc)
Closes: https://github.com/iFixit/ifixit/issues/50009