Jump to content
  • 0

None of my recurring invoices were automatically paid in the last week


sunrisepro

Question

There are nine recurring hosting invoices that were supposed to be run on 2/28 that are still sitting there. However, 3 recurring hosting invoices did run on 2/28. I'm doubting that all 9 have issues with their automatic payment accounts, that would be too great a coincidence. What's the best way to troubleshoot this?

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

The Cron Command field shown in Blesta is a generic command based on the server's operating system that you can copy and use to define the cron job. The actual command that will work on your system may vary depending upon your server environment, and where you define the cron job depends on your environment as well. For example, if you have cPanel installed, you can create cron jobs easily through their interface. See the documentation.

Link to comment
Share on other sites

  • 0

So the cron path on my server changed because I upgraded the server to PHP 7.2. According to my server admins, cron jobs are running properly but 

Quote

the entered php script in the cronjob doesn't meet the requirement of php72

is

/home/username/public_html/backstage/index.php cron

correct? Or should it be something different for php 7.2? Or do I need to upgrade Blesta?

Link to comment
Share on other sites

  • 0
21 minutes ago, sunrisepro said:

So the cron path on my server changed because I upgraded the server to PHP 7.2. According to my server admins, cron jobs are running properly but 

is


/home/username/public_html/backstage/index.php cron

correct? Or should it be something different for php 7.2? Or do I need to upgrade Blesta?

Your cron should specify the full path to PHP, ie /usr/bin/php /home/username/public_html/backstage/index.php cron > /dev/null (etcwhatever is here)

Check Settings > System > Automation to see the recommended command. Blesta attempts to locate your PHP and show the right thing. It may not be 100% accurate all the time, but it's a good place to start. If Apache is running PHP 7.2, then CLI should be also.

Link to comment
Share on other sites

  • 0

The recommended command is 

*/5 * * * * /usr/bin/php /home/username/public_html/backstage/index.php cron

The complete job I have is

/opt/cpanel/ea-php72/root/usr/bin/php /home/username/public_html/backstage/index.php cron

And the last time cron ran was when I manually ran it yesterday.

Also how does CLI relate to this?

Link to comment
Share on other sites

  • 0

Blesta is still not running cron and I have to do it manually. The command that Blesta recommends at Settings > System > Automation has been set for over a month. Clearly running cron manually works so I'm assuming that the recommended cron command is correct.

I'm at a loss - do I need to upgrade Blesta from version 3.6.2?

Link to comment
Share on other sites

  • 0
2 hours ago, sunrisepro said:

Blesta is still not running cron and I have to do it manually. ... Clearly running cron manually works so I'm assuming that the recommended cron command is correct.

When you "Run Cron Manually" from within Blesta, it does not use the server-configured cron job. Instead, Blesta processes the automation tasks itself through the application.

The cron command shown under Settings > System > Automation is only for display purposes; it has no effect on anything. Rather, you need to setup a cron job on your server, and that cron command is an educated guess by Blesta as to what command you need to provide when you setup that cron job. The path to php may differ depending on your server environment and configuration, as you've noticed above, which is why Blesta's displayed cron command is a suggestion based on what it can infer about the server environment it's installed on.

2 hours ago, sunrisepro said:

The command that Blesta recommends at Settings > System > Automation has been set for over a month.

The command set for your cron job is clearly not working. The cron job should run automatically every 5 minutes when setup correctly on the server.

2 hours ago, sunrisepro said:

I'm at a loss - do I need to upgrade Blesta from version 3.6.2?

No, Blesta is not the problem here, so upgrading to any other version will not resolve the problem with your cron job not running.

On 3/15/2019 at 7:07 AM, sunrisepro said:

The complete job I have is


/opt/cpanel/ea-php72/root/usr/bin/php /home/username/public_html/backstage/index.php cron

And the last time cron ran was when I manually ran it yesterday.

Also how does CLI relate to this?

The cron job executed by the server runs in CLI mode. The command you listed is CLI command that essentially says to use php to run the index.php file and pass the parameter "cron".

When you run the cron manually from within Blesta, you are processing the automation tasks from the web server over HTTP, not CLI. You want a cron job to be setup on the server to execute via CLI so that the server automatically runs Blesta's automation tasks at a set interval, every 5 minutes.

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