Jump to content
Remitur

WHMCS, Maintenance Mode and Cron Jobs

Recommended Posts

WHMCS has a "Maintenance mode" option, that will prevent your customers from accessing the Client Area and display the Maintenance Mode Message (or redirect to another URL, if you enter a Maintenance Mode Redirect URL.

This option is very useful anytime you need to do maintenance, that's to say:

  • update of WHMCS core
  • update or install of add-on modules, or Registrars module, or whatsoever
  • full system backup

because it prevents the danger of issues if you're uploading new parts of code, and in the meanwhile a customer makes some kind of operation that requires that very same code...

But the Maintenance mode of WHMCS does not stop cron jobs, that are going on running during your maintenance activity.

This is no good, because the running of cron jobs during maintenance may cause issues too.

To stop cron jobs during maintenance you can use related CLI commands in SSH, or use the related management function available in your control panel: but this way is annoying, time-consuming and far from being error-proof.

There's another way to temporarily stop cron jobs: simply rename your /crons directory (i.e. renaming it as /cronsSTOPPED )

This will prevent any WHMCS cron job from running during your maintenance; after the end of maintenance activity, simply rename back tour directory /cronsSTOPPED to /crons, and everything will run fine again.

 

(ref:  https://domainregister.international/index.php/knowledgebase/664/WHMCS-Maintenance-Mode-and-Cron-Jobs.html )

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Similar Content

    • By ebbydare
      I noticed that since I updated my whmcs to 8.0.4, my cron job has not been working effectively. It's scheduled to run every 5 minutes but its been running every 24 hours. It's as if there is a script in the cron.php that is making it run every 24 hours but I don't know which and what. I'll appreciate any help
    • By ranojit
      I have change php version 7.3 to 7.4 from cPanel. I also edit cron job command and change 
      opt/alt/php73/usr/bin/php -q /*****/****/****/crons/cron.php to 
      opt/alt/php74/usr/bin/php -q /*****/****/****/crons/cron.php  
      but I got error on system health check page on my WHMCS.
       
      How can I solve this issue?
    • By salah uddin
      we am working for whmcs and trying to fix cron status. server is in house hosted.
      Current version: 7.7.0
      we checked the Automation Settings and found " Cron Status Error " and last run long ago. but if we run the below (displaying crontab command)is on manually from terminal we found everything working ok.
       /opt/cpanel/ea-php72/root/usr/bin/php -q /home/leotechltd/public_html/crons/cron.php
      checked the crontab on cpanel  and configuration was as expected given below.
      php -q /home/leotechltd/public_html/crons/cron.php
      if anyone know how to resolve the issue please share your knowledge.
       
       
       
       
    • By mycheapnet
      Hello.
      I am having some sort of cronjob error it seems.
      On the main Dashboard i can see the error " Last Automation Run: Never NEEDS ATTENTION"
      Also in the "systemhealthandupdates" page there is an error :
      "System Cron Tasks The system cron does not appear to have completed successfully within the last 24 hours. Check your activity logs or learn more about enabling the cron in our documentation."
       
      I have gone through other posts regarding this issue but i couldn't find a solution.
      In whmcs cron page it shows " Cron Status Ok Last Run: 06/06/2020 17:23"
      I have tried activating the "Display Errors" checkbox in General settings->other tab, then running : /usr/bin/php -q /home2/myuser/whmcsdata/crons/cron.php --force -vvv
      Then i checked the "System Activity Log" and it had "Domain Sync Cron: Completed".
      But the error was still there.
       
      What else should i try? and why does this happening?
      Thanks
    • By HardSoftCode
      Security login adds an additional layer of security to your client area. If the user failed login attempts x times then the user remember his password and successfully login he need to enter a second passcode that will be send to his email this will make sure that the user is him and he is the one trying to login to his account and it's not another guy trying to get the user account.
      Features
      Countdown date picker Template system with 4 templates Social link for social media buttons Page content manager About us and contact us pages only for minigo template Google reCAPTCHA Subscribe form Export subscribers email addresses to CSV file Changelog
      Rewrite the code from scratch Improve the UI for admin area Improve move emails to email templates New login with verified link New disable security login if the client enable 2FA New google reCAPTCHA New setup the waiting time to request the PIN code resend New prevent email from saving in log New company logo and copyright in page For more details and screenshot visit the product page
      https://www.hardsoftcode.com/products.php?p=product&a=security-login
      ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      Maintenance mode for WHMCS is for preventing any users other than administrators from using the site while maintenance is taking place, though it's not designed to prevent user access during version upgrades. When users attempt to access a course when your site is in maintenance mode, they obtain a message informing them that the site is in maintenance mode. If you wish, you can create a customized maintenance mode message, perhaps stating when the site will be available again or giving the reason for doing maintenance.
      Features
      Countdown date picker Template system with 4 templates Social link for social media buttons Page content manager About us and contact us pages only for minigo template Google reCAPTCHA Subscribe form Export subscribers email addresses to CSV file Changelog
      Rewrite the code from scratch Improve the UI for admin area New subscribe form New 3 new templates New google reCAPTCHA New export subscribers email addresses to CSV file New countdown date picker For more details and screenshot visit the product page
      https://www.hardsoftcode.com/products.php?p=product&a=maintenance-mode
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated