How to check `crontab` configuration and 'Save and Exit' when AnQiCMS back end is inaccessible?

Calendar 👁️ 73

AnQi CMS is an efficient and customizable enterprise-level content management system, and its stable operation is crucial for website operations.When you suddenly find that the AnQiCMS backend is inaccessible, that anxious feeling, we operators are all too clear.Among many possible reasons,crontabMisconfiguration or mistakes made during editing are often an overlooked yet crucial check point. Today, we will delve into how to systematically investigate this problem and mastercrontabThe correct posture for 'Save and Exit'.

Understand the automatic startup mechanism of AnQiCMS andcrontabthe role

AnQiCMS as an application developed based on the Go programming language, the continuous operation of its core process is the foundation for providing services. On Linux servers, in order to ensure that the AnQiCMS process can automatically start after the server restarts and perform periodic health checks, we usually make use ofcrontabSet up a script for starting and monitoring, for example in the installation document (install.md/start.md) mentioned instart.sh. Thisstart.shThe script is like the guardian of the heart of AnQiCMS, it checks if the AnQiCMS process is alive, and if it finds any abnormalities, it will try to restart. Therefore, when the background cannot be accessed, crontabWhether the configuration is appropriate has become one of the primary tasks in troubleshooting.

Initial troubleshooting when the background cannot be accessed

Directly checkingcrontabPreviously, let's first conduct several basic checks to narrow down the scope of the problem:

  1. Server online status confirmationFirst, make sure that your server is running properly.Try to connect to the server using the SSH tool. If you cannot connect, the problem may be due to the server being down, network failure, or an SSH service exception.
  2. AnQiCMS process checkIf you can connect to the server, the next step is to check if the AnQiCMS application process is active. You can enter the following command in the terminal:
    
    ps -ef | grep '\<anqicms\>' | grep -v grep
    
    This command lists all processes containing the keyword 'anqicms' at the same timegrep -v grepIt will filter outgrepThe process of commanding itself. If the return result is empty, or you do not see the AnQiCMS main program process (usually namedanqicmsOr if you have a custom binary file), the problem is likely that the application failed to start or exited abnormally after starting. At this point, it's our turn.crontabTook the stage.
  3. Web server reverse proxy configurationAnQiCMS usually runs on a specific port (default is 8001) and is reverse proxied by Nginx or Apache web servers to forward external domain requests to the listening port of AnQiCMS.Please check your Nginx or Apache configuration file, ensure that the reverse proxy rules are correct and that the target port matches the port that AnQiCMS is actually listening on.proxy_pass https://en.anqicms.com;settings.
  4. Firewall and port conflictEnsure that the server firewall (such asufworfirewalldAllow external traffic to access the port that AnQiCMS is listening on (usually 8001, or the one you have specified)config.jsonThe port is customized. At the same time, check if the port is occupied by other applications, which will cause AnQiCMS to fail to start. In Linux, you can uselsof -i:{端口号}(such aslsof -i:8001Check port usage. If the port is occupied, you may need to terminate the occupying process or change the listening port of AnQiCMS.

In-depth inspectioncrontabConfiguration

If the above checks do not find any problems, or if the AnQiCMS process is indeed not running, then we need to checkcrontabthe configuration.

  1. EditcrontabtaskIn the Linux terminal, enter the following command to edit the current user's scheduled task list:

    crontab -e
    

    This command will open a text editor (usuallyviorvim, or maybenano), Display all scheduled tasks for the current user.

  2. Locate the AnQiCMS startup task: You need to find a line similar to this AnQiCMS startup task:

    */1 * * * * /www/wwwroot/anqicms.com/start.sh
    

    (Please note, the path/www/wwwroot/anqicms.comand script namestart.shmay vary due to your actual installation situation, please refer tostart.mdor check your own configuration.)

  3. Check the configuration items carefully:

    • Does the task exist: First, confirm whether this scheduled task line actually exists.
    • Is the path correct:start.shIs the absolute path of the script exactly consistent with the actual installation path of AnQiCMS? Any slight spelling error or path mismatch will cause the task to fail.
    • Is the script name correct:start.shDoes the script filename match your actual filename? Especially if you have manually changed the AnQiCMS executable file name.
    • Permission issue:start.shDoes the script have execute permission? You can usels -l /path/to/start.shto check, if it does not have execute permission, you can usechmod +x /path/to/start.shto add.
    • start.shScript content: Checkstart.shIs the path and binary filename inside the script correct. For example, the script containsBINPATHThe path pointed to by the variable andBINNAMEWhether the executable filename pointed to by the variable matches the actual situation.

A critical step: "Save and Exit"

Incrontab -eThe editor opened by the command is usually `

Related articles

What is the role of the `nohup` command in the `start.sh` script for the continuous operation of AnQiCMS?

As an experienced website operations expert, I fully understand the importance of a stable and reliable content management system for a corporate website.AnQiCMS (AnQi CMS) leverages the efficiency and concise architecture of the Go language to provide an excellent content management experience for many enterprises.However, even the most powerful system also needs correct deployment and maintenance to ensure its continuous and efficient operation.Today, let's delve into the seemingly insignificant `nohup` command in the `start.sh` script, and explore its crucial role.

2025-11-06

How to manage the startup of different instances of `crontab` when deploying AnQiCMS across multiple sites?

AnQiCMS with its efficient and flexible architecture provides powerful support for enterprise content management.Especially when dealing with multi-site requirements, AnQiCMS provides various deployment solutions, one of which is to run multiple independent AnQiCMS instances on the same server to manage different websites.How can website operators skillfully use `crontab` scheduled tasks to ensure the stable startup and continuous operation of these different instances when adopting this deployment mode, which has become a key link that needs to be deeply understood by website operators.This article will elaborate on this topic in detail

2025-11-06

If AnQiCMS `crontab -e` opens another editor, how to 'save and exit'?

As an experienced website operations expert, I am well aware of the importance of efficient and stable system operation for AnQiCMS and other enterprise-level content management systems.When deploying and maintaining AnQiCMS, we often encounter scenarios where we need to configure scheduled tasks (crontab), such as the `start.sh` script mentioned in the `install.md` that is used to guard the AnQiCMS process.However, when executing the `crontab -e` command, many users may find that the editor opened is not the one they are familiar with

2025-11-06

How to automatically restore the service after the AnQiCMS server restarts using `crontab`?

As an experienced website operations expert, I know that the stable operation of the website is the foundation for the continuous exertion of content value.For systems like AnQiCMS that are dedicated to providing efficient and reliable content management solutions, ensuring the continuous online service is of paramount importance.Unexpected server restarts, whether planned maintenance or sudden situations, can lead to service interruption of AnQiCMS, thereby affecting user access and content presentation.Therefore, mastering how to automatically recover AnQiCMS services after server restart is a necessary skill for every operator. Today

2025-11-06

In AnQiCMS scheduling task, how to correctly delete the `start.sh` task that is no longer needed?

As an experienced website operations expert, I am well aware of the importance of configuring and maintaining each system task for the stable operation of the website.AnQiCMS (AnQiCMS) is highly praised for its efficiency and convenience in the field of content management.In daily operations, we sometimes encounter situations where we need to adjust or remove specific tasks, such as the `start.sh` scheduled task that is no longer needed.Handle these tasks properly, not only does it concern the effective utilization of server resources, but also relates to the overall cleanliness and safety of the system.Today, let's delve into it in detail, when you decide not to let `start

2025-11-06

What is the meaning and modification suggestion of `*/1 * * * *` in the AnQiCMS `crontab` configuration?

As an experienced website operations expert, I am happy to give you a detailed explanation of the meaning and modification suggestions of the `crontab` configuration `*/1 * * * *` in AnQiCMS.An enterprise CMS with its high efficiency, stability, and easy scalability has won the favor of many small and medium-sized enterprises and content operators. The automated mechanisms behind it, such as scheduled tasks (`crontab`), are one of the key factors for its stable operation.

2025-11-06

How to avoid accidental exit during AnQiCMS `crontab` editing, leading to configuration loss?

As an experienced website operations expert, we know that a reliable automation mechanism is indispensable for the stable operation of a website.In the world of AnQiCMS, `crontab` (scheduled task) plays a key role in starting services and executing periodic tasks.However, in practice, many operators have faced such a predicament: when editing `crontab`, due to accidental logout or improper operation, the valuable task configuration is lost instantly.This may disrupt the normal business process and bring additional troubleshooting and recovery costs. Today

2025-11-06

What is the role and modification scenario of the `BINNAME` variable in AnQiCMS `start.sh`?

As an experienced website operations expert, I know that every system configuration detail may affect the stability and operation efficiency of the website.Today, let's delve into a variable in AnQiCMS that seems trivial but plays a crucial role in actual deployment and multi-site management - the `BINNAME` in the `start.sh` script.Understand its role and modification scenarios, which can help us manage AnQiCMS sites more efficiently and safely.### Reveal the contents of AnQiCMS `start.sh`

2025-11-06