Jump to content
  • 0

Apply Payments to Open Invoices Takes Very Long to Run


mlsto

Question

Hello

Notice that the task "Apply Payments to Open Invoices" takes very long to run, I have it set every 5 minutes, yesterday it took 6 hours to complete today it is just circling and says has not run since 2am, so 4 hours so far.

Why is this happening, got two PayPal payments yesterday and it did not record them, I had to pay the invoices manually.

Please advise.

Thank you

Link to comment
Share on other sites

Recommended Posts

  • 0
1 hour ago, Licensecart said:

It could be a cron job task is stalling and hasn't moved onto the other task or the PayPal isn't able to callback and tell Blesta the payment has been made.

The other delays for PayPal payments are if a client uses a e-Cheque or doesn't have the funds yet.

Can I ask what would cause the cron job stall or why the call back is not working?

Worked before.

Thanks

Link to comment
Share on other sites

  • 0
3 minutes ago, mlsto said:

Can I ask what would cause the cron job stall or why the call back is not working?

Worked before.

Thanks

Best to check the Settings > Company > Automation and see if there's a spinner near a task job which doesn't vanish.

Link to comment
Share on other sites

  • 0
1 hour ago, Licensecart said:

Best to check the Settings > Company > Automation and see if there's a spinner near a task job which doesn't vanish.

Yes the spinner is there it has been running now for 6 hours, it eventually goes away but everyday now it stall for over 6 hours.

Link to comment
Share on other sites

  • 0
51 minutes ago, mlsto said:

It just ended so took 7 hours to run.

ah and yeah the guys will be able to sort it for you hopefully I don't have that but I did have a cron task stuck before and it was the provisioning services one and it was because a pending service couldn't provision.

Link to comment
Share on other sites

  • 0

Is it actually running that long? Do you see the process running on your server? Or does it hang, and get reset after 6 hours? I would suggest disabling your cron job, and enabling error reporting and debugging and running it manually when it's scheduled to run next.

To enable error reporting, edit /config/blesta.php and change **Configure::errorReporting(0);** to **Configure::errorReporting(-1);** You may also wish to enable System Debug. To do so, change **Configure::set("System.debug", false);** to **Configure::set("System.debug", true);**

It's a good idea to change these settings back when you are done.

 

Link to comment
Share on other sites

  • 0

The process I see is in Blesta, it says on the dashboard some jobs have not run in the past hours, when I go to automation you see the circling icon there running. It stays this way for 6 - 7 hours. I have it set every 5 minutes. Do not believe anything resets it just hangs there.

Doing it manually would mean every 5 minutes I would think, that is much. Looking for automation.

Link to comment
Share on other sites

  • 0

I am now seeing this, I am thinking as I put the error reporting?

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

Process Service Changes

Paid queued service changes (e.g. upgrades) are processed at the interval selected.

Task Last Ran: May 10, 2017 4:55:03 AM  "Clear Task Lock"

Link to comment
Share on other sites

  • 0

Here is the manual cron job, it shows the error, see below:

Attempting to apply credits to open invoices.
There are no invoices to which credits may be applied.
The apply credits task has completed.
Attempting to deliver invoices scheduled for delivery.
No invoices are scheduled to be delivered.
The deliver invoices task has completed.
Attempting to provision paid pending services.
The paid pending services task has completed.
Attempting to unsuspend paid suspended services.
The unsuspend services task has completed.
Attempting to process service changes.
Error: Argument 2 passed to ServiceChanges::edit() must be of the type array, none given, called in /home/public_html/clients/app/controllers/cron.php on line 2015 and defined #0 /home/public_html/clients/app/models/service_changes.php(64): UnknownException::setErrorHandler(4096, 'Argument 2 pass...', '/home//...', 64, Array) #1 /home/public_html/clients/app/controllers/cron.php(2015): ServiceChanges->edit(Array) #2 /home/public_html/clients/app/controllers/cron.php(1951): Cron->runProcessServiceChanges('Attempting to p...') #3 [internal function]: Cron->processServiceChanges('9ae7b25cf269055...') #4 /home/public_html/clients/app/controllers/cron.php(175): call_user_func_array(Array, Array) #5 /home/public_html/clients/app/controllers/cron.php(127): Cron->all('9ae7b25cf269055...') #6 /home/public_html/clients/vendors/minphp/bridge/src/Lib/Dispatcher.php(143): Cron->index() #7 /home/public_html/clients/index.php(21): Dispatcher::dispatch('/clients/cron/?...') #8 {main}Attempting to process renewing services.
The process renewing services task has completed.
Attempting plugin cron for order accept_paid_orders.
Finished plugin cron for order accept_paid_orders.
Attempting plugin cron for support_manager poll_tickets.
Finished plugin cron for support_manager poll_tickets.
Attempting plugin cron for mass_mailer export.
Finished plugin cron for mass_mailer export.
Attempting plugin cron for mass_mailer mass_mail.
Finished plugin cron for mass_mailer mass_mail.
All tasks have been completed.
Attempting to run all system tasks.
All system tasks have been completed.

Link to comment
Share on other sites

  • 0

So this is the issue:
 

Error: Argument 2 passed to ServiceChanges::edit() must be of the type array, none given, called in /home/public_html/clients/app/controllers/cron.php on line 2015 and defined #0 /home/public_html/clients/app/models/service_changes.php(64): UnknownException::setErrorHandler(4096, 'Argument 2 pass...', '/home//...', 64, Array) #1 /home/public_html/clients/app/controllers/cron.php(2015): ServiceChanges->edit(Array) #2 /home/public_html/clients/app/controllers/cron.php(1951): Cron->runProcessServiceChanges('Attempting to p...') #3 [internal function]: Cron->processServiceChanges('9ae7b25cf269055...') #4 /home/public_html/clients/app/controllers/cron.php(175): call_user_func_array(Array, Array) #5 /home/public_html/clients/app/controllers/cron.php(127): Cron->all('9ae7b25cf269055...') #6 /home/public_html/clients/vendors/minphp/bridge/src/Lib/Dispatcher.php(143): Cron->index() #7 /home/public_html/clients/index.php(21): Dispatcher::dispatch('/clients/cron/?...') #8 {main}Attempting to process renewing services.

Have you tried uploading the files again for 4.0.x and are you on 4.0.1 I wonder if that will fix it?

Link to comment
Share on other sites

  • 0

Not sure what the error means, I am using 4.0.1. Do not want to mess things up but what file would I upload and overwrite. I uploaded only the patch to upgrade.

Hoping @Paul and @Tyson can help with this as the task now shows as "Clear Task Lock"

Once I clear it, it comes back because it runs every 5 minutes.

Link to comment
Share on other sites

  • 0
1 hour ago, Paul said:

It sounds like you may have pending service changes that are unable to be processed for whatever reason. Take a look in your service_changes table. You may need to remove any items that are in here as they are unable to be processed. If you do so, be sure to back it all up first.

Yes this seems to have worked there was an entry to confirm a cpanel password, I deleted and seems to be working now.

Thank you very much Paul for the help.

Link to comment
Share on other sites

  • 0

Well seems to be back, the job "Apply Payments to Open Invoices" has been running for 6 hours. I did the cron manually and there were no errors all went well the only job I see that did not show was the "Apply Payments to Open Invoices".

Any ideas how to fix this.

Thank you

Link to comment
Share on other sites

  • 0
3 hours ago, mlsto said:

Now two items are stuck:

Apply Payments to Open Invoices

Provision Paid Pending Services

Please advise

Can I get some form of support, orders are coming in and because the cron job is stuck on the above it is not being placed.

Link to comment
Share on other sites

  • 0

I have run the cron manual and no errors but it is not running these two jobs

Attempting to deliver invoices scheduled for delivery.
No invoices are scheduled to be delivered.
The deliver invoices task has completed.
Attempting to unsuspend paid suspended services.
The unsuspend services task has completed.
Attempting to process service changes.
The process service changes task has completed.
Attempting to process renewing services.
The process renewing services task has completed.
Attempting plugin cron for order accept_paid_orders.
Finished plugin cron for order accept_paid_orders.
Attempting plugin cron for support_manager poll_tickets.
Finished plugin cron for support_manager poll_tickets.
Attempting plugin cron for mass_mailer export.
Finished plugin cron for mass_mailer export.
Attempting plugin cron for mass_mailer mass_mail.
Finished plugin cron for mass_mailer mass_mail.
All tasks have been completed.
Attempting to run all system tasks.
All system tasks have been completed.

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
Answer this question...

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

Loading...
×
×
  • Create New...