Set the "Time Factor-Scheduled Release Function" of AnQiCMS, save and exit the document, how does the system ensure automatic release at the specified time?
As an experienced CMS website operation personnel of an enterprise, I am well aware of the importance of content publishing timeliness and automated management.The 'Time Factor - Scheduled Publishing Feature' provided by AnQi CMS is the key to solving this pain point.Many operators, after setting the scheduled release time of the article and clicking 'Save and Exit', will be curious about how the system ensures that the article is published on time.
The scheduling mechanism of Anqi CMS, the core lies in its efficient task scheduling and content status management on the backend.When you set a future publish time for a document in the editing interface and click 'Save and Exit', the system will store the document along with its set future publish time in the database.The document's status is usually not "published", but rather a pending or draft status, waiting to reach the specified time.
Anqi CMS is an enterprise-level content management system built based on Go language, its high-performance architecture is the cornerstone for efficient scheduled publication. Go language is renowned for its excellent concurrent processing capabilities (achieved through Goroutines for asynchronous processing), which enables Anqi CMS to run one or more lightweight background processes or 'scheduling tasks' as followschangelog.mdThe mentioned v2.0.0-alpha5 version adds the 'Scheduled Task feature', and continuously monitors all pending content to be published.
In particular, there will be a special task inside the system responsible for content publishing scheduling.This task will regularly (for example, every few minutes or less) scan the database to find documents that are due or past due for publication.Once a document meeting the conditions is found, the system will immediately perform a publication operation: update the document status from "pending publication" to "published", and push its content to the website front-end for access.The entire process requires no human intervention, it is fully automated.
To ensure the stable operation of the timed publishing function, the Anqi CMS application itself must remain online.This means that whether through the Docker deployment of Baota panel, the LNMP environment deployment under the command line, or other methods, it is necessary to ensure that the Go application (i.e., the anqicms executable file) runs continuously.In Linux environment, it is usually配合crontabWait for the system-level task scheduler to monitor the AnQiCMS process, ensuring that the program can automatically restart even if it is terminated unexpectedly (such asinstall.mdandstart.mdDescribed instart.shThe script does). Only when the AnQiCMS main program is online and working properly, its built-in content publishing scheduling tasks can be executed continuously and effectively.
Therefore, when you set the scheduled release and save it in Anqi CMS, you can rest assured that the system has included the publishing task in its internal scheduling queue.As long as the AnQiCMS application itself keeps running, it will reliably publish your content at the specified time point automatically, greatly enhancing the flexibility and efficiency of content operation.
Frequently Asked Questions (FAQ)
1. If the AnQiCMS application is offline or crashed at the scheduled publishing time, will the article be published automatically?
I can't. The scheduling publication feature depends on the scheduling mechanism inside the AnQiCMS application.If the application is offline or crashed at the scheduled release time, the article will not be published automatically on time.Once the application is back online and stable, it will rescan the pending release queue and publish the content that is scheduled to be released but has not been published yet.It is strongly recommended to configure system-level process protection tools (such as those on Linux, likecroncooperatestart.shScript), ensure that the AnQiCMS application can run stably and continuously.
2. Can I modify the content or publication time of the article before the scheduled publication?
Can. As long as the article has not been published by the system, you can edit the document at any time in the background, modify its content, publication time, or any other attribute.After modification, the system will take the latest settings as standard. If the new release time is still in the future, the article will continue to wait for scheduling;If the modified publish time has passed, the article is usually published immediately after you save and exit.
If I set a past publish time, will the article be published immediately?
Yes. If you set the publish time to a past date when creating or editing a document, the AnQiCMS internal scheduling task will quickly detect this situation and immediately mark the document as 'published', making it visible on the front page after you save and exit.