Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


WHMCS Cron Optimsiation
New on LowEndTalk? Please Register and read our Community Rules.

WHMCS Cron Optimsiation

Jamie_DreamITJamie_DreamIT Member, Host Rep
edited June 10 in Providers

Hey all.

I'm sure many of the hosts here using WHMCS would have had an issue with WHMCS automation at some point.

We've recently updated our crontab to run each cron module manually. This has already saved countless hours debugging cron issues (cron not having enough memory or a plugin causing the automation to stop completely, resulting in the remaining tasks not being run)

Using info from https://docs.whmcs.com/Crons#Commands, this is the cron jobs schedule (most of these tasks run within a few seconds).

These cron commands run every 2 minutes after 3 pm. Feel free to adjust as required.

0 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --CurrencyUpdateExchangeRates
2 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --CurrencyUpdateProductPricing
4 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --CreateInvoices
6 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --AddLateFees
8 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --ProcessCreditCardPayments
10 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --InvoiceReminders
12 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --DomainRenewalNotices
14 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --DomainStatusSync
16 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --DomainTransferSync
18 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --CancellationRequests
20 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --AutoSuspensions
22 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --AutoTerminations
24 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --FixedTermTerminations
26 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --CloseInactiveTickets
28 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --AutoPruneTicketAttachments
30 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --AffiliateCommissions
32 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --AffiliateReports
34 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --EmailMarketer
36 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --CreditCardExpiryNotices
38 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --SslSync
42 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --OverageBilling
44 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --AutoClientStatusSync
46 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --UpdateDomainExpiryStatus
48 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --TicketEscalations
50 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --CheckForWhmcsUpdate
52 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --DatabaseBackup
54 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --DataRetentionPruning
56 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --SslReissues
58 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --ServerUsageCount
0 16 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --ServerRemoteMetaData
4 16 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --EmailCampaigns
5 16 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --ProcessEmailQueue

# i would suggest running these crons early in the morning and adjusting your original minute cron to exclude these tasks

2 16 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --TenantUsageMetrics
40 15 * * * /opt/alt/php74/usr/bin/php /path-to-whmcs/public_html/crons/cron.php do --UpdateServerUsage
Thanked by 3xTom Donkey MrRadic

Comments

  • The last few are not two minutes apart.

    Why do this all over one hour instead of throughout the day?

    Why don't they have their own service to run updates? Seems like a poor way to ensure things run properly and in order.

  • Jamie_DreamITJamie_DreamIT Member, Host Rep
    edited June 11

    You can adjust the cron times (as I have) to run throughout the day, and most of them complete within a few seconds.

    There is a cron that can be run, but with WHMCS being WHMCS, if any plugin causes a failure, all subsequent tasks are skipped (why, I don't know).

  • LittleCreekLittleCreek Member, Patron Provider

    I have been using WHMCS since 2007. I have never had an issue. I have only contacted support a handful of times regarding features or how to do something. But thanks for the advice. I will keep that in mind for the future.

  • HaroldMHaroldM Member

    WHMCS is horrible piece of code, IDK why people still use it :smiley:

    Thanked by 1Donkey
  • defaultdefault Member

    Thanked by 2TimboJones ralf
  • wtf why?

    the end is nigh.

  • MrRadicMrRadic Member, Patron Provider

    @HaroldM said:
    WHMCS is horrible piece of code, IDK why people still use it :smiley:

    There was nothing as complete at the cost until recently.

  • HaroldMHaroldM Member

    @MrRadic said: There was nothing as complete at the cost until recently.

    that's so sad :/

  • MrRadicMrRadic Member, Patron Provider

    @HaroldM said:

    @MrRadic said: There was nothing as complete at the cost until recently.

    that's so sad :/

    Yeah, the hosting provider market isn't huge.

  • MikePTMikePT Moderator, Patron Provider

    @MrRadic said:

    @HaroldM said:
    WHMCS is horrible piece of code, IDK why people still use it :smiley:

    There was nothing as complete at the cost until recently.

    Until recently? Are you talking about Blesta? IMO it still lacks a lot of stuff.

  • MrRadicMrRadic Member, Patron Provider

    @MikePT said:

    @MrRadic said:

    @HaroldM said:
    WHMCS is horrible piece of code, IDK why people still use it :smiley:

    There was nothing as complete at the cost until recently.

    Until recently? Are you talking about Blesta? IMO it still lacks a lot of stuff.

    I'm referring to the recent cost increases. There's going to be more support for other billing systems throughout the years as WHMCS adoption slows.

    Thanked by 1MikePT
  • MikePTMikePT Moderator, Patron Provider

    @MrRadic said:

    @MikePT said:

    @MrRadic said:

    @HaroldM said:
    WHMCS is horrible piece of code, IDK why people still use it :smiley:

    There was nothing as complete at the cost until recently.

    Until recently? Are you talking about Blesta? IMO it still lacks a lot of stuff.

    I'm referring to the recent cost increases. There's going to be more support for other billing systems throughout the years as WHMCS adoption slows.

    We need a new player that could match what WHMCS offers, for sure.
    Blesta is still too far.

  • MrRadicMrRadic Member, Patron Provider

    @MikePT said:

    @MrRadic said:

    @MikePT said:

    @MrRadic said:

    @HaroldM said:
    WHMCS is horrible piece of code, IDK why people still use it :smiley:

    There was nothing as complete at the cost until recently.

    Until recently? Are you talking about Blesta? IMO it still lacks a lot of stuff.

    I'm referring to the recent cost increases. There's going to be more support for other billing systems throughout the years as WHMCS adoption slows.

    We need a new player that could match what WHMCS offers, for sure.
    Blesta is still too far.

    Without a doubt.

    Thanked by 1MikePT
  • HaroldMHaroldM Member

    @MikePT said: We need a new player that could match what WHMCS offers, for sure.

    I have ability to develop system like this, but the issue is I'm not good at marketing.

  • MikePTMikePT Moderator, Patron Provider

    @HaroldM said:

    @MikePT said: We need a new player that could match what WHMCS offers, for sure.

    I have ability to develop system like this, but the issue is I'm not good at marketing.

    We've read so many people say that.

    Happy to help with the Marketing area should you release it... :)

  • HaroldMHaroldM Member

    @MikePT said: We've read so many people say that.

    Agreed, I have also seen so many people trying to achive this in the past with different kind of systems.

    The thing is none of the major providers will not going to migrate into new system because it's going to be hard. Getting new providers on board will not do much in financial because few of them sustain in the long run. I think this is what exactly Blesta, HostBill like systems experiencing right now.

    Thanked by 1MikePT
  • MikePTMikePT Moderator, Patron Provider

    @HaroldM said:

    @MikePT said: We've read so many people say that.

    Agreed, I have also seen so many people trying to achive this in the past with different kind of systems.

    The thing is none of the major providers will not going to migrate into new system because it's going to be hard. Getting new providers on board will not do much in financial because few of them sustain in the long run. I think this is what exactly Blesta, HostBill like systems experiencing right now.

    Indeed. An effective, easy migration path, that's what people need. And an actual fully-functional billing system etc.

  • emghemgh Member

    Blesta is good.

Sign In or Register to comment.