Jump to content
  • 0

Blesta report CRON still running


jwogrady

Question

Blesta is saying cron jobs are still pending....  Everything is reporting at run and complete inside of Blesta and on the command line.

root@debian:~# /usr/bin/php /path/to/blesta/index.php cron
Attempting to run all tasks for Company A
All tasks have been completed.
Attempting to run all tasks for Company B
All tasks have been completed.
Attempting to run all system tasks.
All system tasks have been completed.
root@debian:~# ps aux | grep $(cat /var/run/crond.pid)
root     10416  0.0  0.2  12748  2144 pts/0    S+   17:23   0:00 grep 10261
root@debian:~#

Can't find any hints what might still be pending....

Screen Shot 2017-03-22 at 5.25.27 PM.png

No unrun tasks in "View Automated Task"

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

I've had this issue and it turned out to be an issue with the php.ini for php5-cli not having the entry for mailparse.

Have your CRON log errors after you remove the lock from the task in blesta

For example, my crontab would look like the following.

*/5 * * * * /usr/bin/php /var/www/blesta/public_html/index.php cron >> /home/me/blesta.txt 2>&1
Quote

why is this still grinding away.  No active crons.  Task disabled....  What's controls that and how do I reset that?

Disabiling the task does not halt the task. It's still running as Blesta doesn't halt on failure, it continues to "run". You need to add the code to remove the lock (unless it was changed in v4).

When you add the code, you have to wait ~60mins, than a link will appear to halt the task so the cron executes that specific task on next scheduled run, as of now your task is locked.

 

Or you can remove the task manually

Link to comment
Share on other sites

  • 0

Yeah, missed it the first three times I looked at it....

Connects to the POP3/IMAP server to download emails and convert them into tickets.

There really needs to be a test button on the imap/pop config settings tab...  Or a tab in the log files...  Will submit a feature request.

Link to comment
Share on other sites

  • 0
27 minutes ago, jwogrady said:

Yeah, missed it the first three times I looked at it....


Connects to the POP3/IMAP server to download emails and convert them into tickets.

There really needs to be a test button on the imap/pop config settings tab...  Or a tab in the log files...  Will submit a feature request.

Wonder if you have a bounce email causing that if it lasts a long time as there might be a lot of null end tasks which needs to complete so no need to worry too much.

Link to comment
Share on other sites

  • 0
22 minutes ago, jwogrady said:

Where is the log for that service.   I had a staff member with an invalid email address that was generating undeliverables alerts every time someone entered a support message.   I deleted that user.... and that is around the time I noticed this issue...

SELECT * FROM `log_cron` WHERE `run_id` = 19 ORDER BY `start_date` DESC;

or

SELECT * FROM `log_cron` WHERE `run_id` = 35 ORDER BY `start_date` DESC;

it should say piping

Link to comment
Share on other sites

  • 0
29 minutes ago, Licensecart said:

SELECT * FROM `log_cron` WHERE `run_id` = 19 ORDER BY `start_date` DESC;

or

SELECT * FROM `log_cron` WHERE `run_id` = 35 ORDER BY `start_date` DESC;

it should say piping

The queries returned zero, but it's probably because I'm using IMAP.  Was able to connect and download email with another imap client.  Process still pending.

Link to comment
Share on other sites

  • 0
1 hour ago, cloudrck said:

I've had this issue and it turned out to be an issue with the php.ini for php5-cli not having the entry for mailparse.

Have your CRON log errors after you remove the lock from the task in blesta

For example, my crontab would look like the following.


*/5 * * * * /usr/bin/php /var/www/blesta/public_html/index.php cron >> /home/me/blesta.txt 2>&1

Disabiling the task does not halt the task. It's still running as Blesta doesn't halt on failure, it continues to "run". You need to add the code to remove the lock (unless it was changed in v4).

When you add the code, you have to wait ~60mins, than a link will appear to halt the task so the cron executes that specific task on next scheduled run, as of now your task is locked.

 

Or you can remove the task manually

 

So, here is what I think happened.....

Since the upgrade I've been having to run crons manually in Blesta.  The mail was working great, but no automation.

Today I learned that I need to add ionCube to /etc/php/7.0/cli/conf.d to get the automation to work.  Anyone interested, can relive those moments here.... 

 

So after that automation started working, but it couldn't complete the mail task... so it was hung.

The solution to fix the mail task was to to copy mailparse.ini into /etc/php/7.0/clic/conf.d that same way I had done above.

/etc/php/7.0/cli/conf.d# cp ../../cli/conf.d/20-mailparse.ini .

That fixed the broken task, but as you said, I still need to add an end time to the open process in log_cron.

What a day.....

 

Link to comment
Share on other sites

  • 0

we have the same issue but with php 5.6 , after upgrade to v4 , the Download Tickets cron job always running

Connects to the POP3/IMAP server to download emails and convert them into tickets.

Task Last Ran: Mar 24, 2017 1:35:03 PM

we have changed the cron to run every 15 min, but still always running didn't stop !!!!

Link to comment
Share on other sites

  • 0
2 hours ago, Blesta Addons said:

we have the same issue but with php 5.6 , after upgrade to v4 , the Download Tickets cron job always running


Connects to the POP3/IMAP server to download emails and convert them into tickets.

Task Last Ran: Mar 24, 2017 1:35:03 PM

we have changed the cron to run every 15 min, but still always running didn't stop !!!!

Did you try disabling the cron, and running it manually via CLI? Maybe there's an error preventing completion?

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