Jump to content

Is there a way to invoke just server usage checking instead of running the entire CRON?


Recommended Posts

I need to manually invoke the server usage checking (overuse) on our shared server to troubleshoot a Virtualmin issue whereby Virtualmin usage statistics and WHMCS usage statistics are completely mismatches (or just missing). I note in the manual a command:

php -q /home/folder/public_html/crons/cron.php all -F -vvv
https://docs.whmcs.com/Cron_Job_Issues#Run_the_cron_job_from_the_server_command_line_with_debugging_enabled

This command runs "all" the 27 tasks. However, I just need it to run for "Server Usage Stats".

Is this possible? Is there some other way? I'm scared to run it for "all" because I'm afraid I'll generate invoices alerting my clients to problems in our system.

Link to comment
Share on other sites

Thank you Brian, that worked! Great, now I can reliably test overuse and move on to the next problem which involved mismatches. Before when I test I had to wait for the dialy CRON to finish which takes too long causing the CURL request to Virtualmin to time out. Doing it standalone by following the link you specified is very quick. Beautiful thanks man.

Link to comment
Share on other sites

  • WHMCS Technical Analyst II

Just in case anyone sees this in the future, you can also run the  /crons/cron.php script manually with the "do --UpdateServerUsage" parameters as described at https://docs.whmcs.com/Crons#Advanced_Task_Scheduling

That will run only the server stats task as desired.

Link to comment
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.

×
×
  • 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