Jump to content

Cron job not running after upgrade 7.2.3


Recommended Posts

Cron job of my WHMCS has stopped working, it executes but no automatic action is performed. I always receive an email with the following content:

 

==============================

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Oops!</title>

 

<style>

body {

margin: 30px 40px;

background-color: #f6f6f6;

}

.error-container {

padding: 50px 40px;

font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;

font-size: 14px;

}

h1 {

margin: 0;

font-size: 48px;

font-weight: 400;

}

h2 {

margin: 0;

font-size: 26px;

font-weight: 300;

}

a {

color: #336699;

}

p.back-to-home {

margin-top: 30px;

}

p.debug{

padding: 20px 0px;

font-family: "Courier New", Courier, monospace, serif;

font-size: 14px;

}

.info {

border: solid 1px #999;

padding: 5px;

background-color: #d9edf7;

}

</style>

 

</head>

<body>

<div class="error-container">

<h1>Oops!</h1>

<h2>Something went wrong and we couldn't process your request.</h2>

<p>Please go back to the previous page and try again.</p>

</div>

</body>

</html>

==============================

 

When run cron force via command line showing same error:

 

==================

php /home/billingw/crons/cron.php all --force -vvv

 

WHMCS Automation Task Utility: all

==================================

 

Daily Cron Automation Mode

 

Queuing Tasks

-------------

 

Force run any tasks: ignore "in progress" and "is due"

Task queues ready

 

Executing Application Queue

---------------------------

 

0/22 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% < 1 sec/< 1 sec 20.2 MiB

Currency Exchange Rates

 

Product Pricing Updates

 

2/22 [▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░] 9% < 1 sec/< 1 sec 20.2 MiB

Invoices

 

Late Fees

 

4/22 [▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░] 18% 2 secs/11 secs 21.0 MiB

Credit Card Charges

 

Invoice & Overdue Reminders

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Oops!</title>

 

<style>

body {

margin: 30px 40px;

background-color: #f6f6f6;

}

.error-container {

padding: 50px 40px;

font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;

font-size: 14px;

}

h1 {

margin: 0;

font-size: 48px;

font-weight: 400;

}

h2 {

margin: 0;

font-size: 26px;

font-weight: 300;

}

a {

color: #336699;

}

p.back-to-home {

margin-top: 30px;

}

p.debug{

padding: 20px 0px;

font-family: "Courier New", Courier, monospace, serif;

font-size: 14px;

}

.info {

border: solid 1px #999;

padding: 5px;

background-color: #d9edf7;

}

</style>

 

</head>

<body>

<div class="error-container">

<h1>Oops!</h1>

<h2>Something went wrong and we couldn't process your request.</h2>

<p>Please go back to the previous page and try again.</p>

</div>

</body>

 

 

==================

Link to comment
Share on other sites

Here is command output:

 

Daily Cron Automation Mode

 

Queuing Tasks

-------------

 

Force run any tasks: ignore "in progress" and "is due"

Task queues ready

 

Executing Application Queue

---------------------------

 

0/22 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% < 1 sec/< 1 sec 20.5 MiB

Currency Exchange Rates

 

Product Pricing Updates

 

2/22 [▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░] 9% < 1 sec/< 1 sec 20.5 MiB

Invoices

 

Late Fees

 

4/22 [▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░] 18% 1 sec/6 secs 21.2 MiB

Credit Card Charges

 

Invoice & Overdue Reminders

 

Fatal error: Maximum execution time of 300 seconds exceeded in /home/user/public_html/vendor/tecnickcom/tcpdf/tcpdf.php on line 7293

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Oops!</title>

 

<style>

body {

margin: 30px 40px;

background-color: #f6f6f6;

}

.error-container {

padding: 50px 40px;

font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;

font-size: 14px;

}

h1 {

margin: 0;

font-size: 48px;

font-weight: 400;

}

h2 {

margin: 0;

font-size: 26px;

font-weight: 300;

}

a {

color: #336699;

}

p.back-to-home {

margin-top: 30px;

}

p.debug{

padding: 20px 0px;

font-family: "Courier New", Courier, monospace, serif;

font-size: 14px;

}

.info {

border: solid 1px #999;

padding: 5px;

background-color: #d9edf7;

}

</style>

 

</head>

<body>

<div class="error-container">

<h1>Oops!</h1>

<h2>Something went wrong and we couldn't process your request.</h2>

<p>Please go back to the previous page and try again.</p>

<p class="debug">exception 'Whoops\Exception\ErrorException' with message 'Maximum execution time of 300 seconds exceeded' in /****/*****/public_html/vendor/tecnickcom/tcpdf/tcpdf.php:7293<br />

Stack trace:<br />

#0 /home/user/public_html/vendor/whmcs/whmcs-foundation/lib/Utility/Error/Run.php(0): WHMCS\Utility\Error\Run->handleError(1, 'Maximum executi...', '/home/user/...', 7293)<br />

#1 [internal function]: WHMCS\Utility\Error\Run->handleShutdown()<br />

#2 {main}</p></div>

</body>

Link to comment
Share on other sites

Alright, it looks like this is the issue:

 

<p class="debug">exception 'Whoops\Exception\ErrorException' with message 'Maximum execution time of 300 seconds exceeded' in /****/*****/public_html/vendor/tecnickcom/tcpdf/tcpdf.php:7293<br />

 

 

Something is causing the PDF to time out, start by lifting the PHP execution time to 600 seconds, and possibly re-uploading the whole /vendor folder

Link to comment
Share on other sites

  • WHMCS Support Manager

Hi,

Do you have any customisation to /templates/*your active template*/invoicepdf.tpl?

Try moving aside your /assets/img/logo.png or logo.jpg file temporarily.

 

Either of these could increase the PDF filesize as such that generating a lot causes the max execution time to be reached.

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