Forums | Mahara Community

Support /
Maraha reporting cron is not running


Juan Menéndez's profile picture
Posts: 36

27 February 2018, 4:45

Hello,

These are the data of my Mahara:
Mahara version = 16.10.8
Database = MySQL

I see the message "Cron is not running"  in the Mahara admin dashboard, but I do not know what is the reason for this to happen.

I have made the following checks in the database:



mysql> select * from config where field like '%cron%';
+--------------------------------------+------------+
| field | value |
+--------------------------------------+------------+
| _cron_lock_core_cron_site_data_daily | 1519599916 |
+--------------------------------------+------------+
1 row in set (0.00 sec)

mysql> select * from cron where nextrun IS NULL OR nextrun < CURRENT_DATE;
+----+----------------------+---------------------+--------+------+-----+-------+-----------+
| id | callfunction | nextrun | minute | hour | day | month | dayofweek |
+----+----------------------+---------------------+--------+------+-----+-------+-----------+
| 15 | cron_site_data_daily | 2018-02-24 23:51:00 | 51 | 23 | * | * | * |
+----+----------------------+---------------------+--------+------+-----+-------+-----------+

I have removed the lock by deleting this row.
After doing this cron has returned to work again.

About this problem I have 3 questions:

1. How can I avoid this lock?

2. Is it possible to add blocking information in the Mahara admin dashboard?

3. It is possible to add a new button to the Mahara admin dashboard to be able to eliminate these locks from the admin dashboard?

Thank you very much.

 

Robert Lyon's profile picture
Posts: 749

27 February 2018, 8:30

Hello Juan

To answer your questions

> 1. How can I avoid this lock?

The cron system adds a lock to the config table when the cron function begins to run and removes the lock when the cron function finishes. If the function is a slow process, say elasticsearch indexing it can take a little while for that process to finish so the lock may still be in place when next cron run happens, but will usually be cleared in a few minutes.

But if a cron lock is there for hours or more it means the cron function caused errors and didn't complete.

For long existing cron locks it is useful to delete the cron lock and then watch the error logs to see if the cron function is failing to compete due to errors.

> 2. Is it possible to add blocking information in the Mahara admin dashboard?

Currently no, but should not be hard to add some more info to the admin dashboard page

> 3. It is possible to add a new button to the Mahara admin dashboard to be able to eliminate these locks from the admin dashboard?

It should not be hard to add a button to the admin dashboard page

 

For points 2 and 3 I will add a wishlist bug report https://bugs.launchpad.net/mahara/+bug/1751874 as i think they are useful things to add to Mahara

Cheers

Robert

2 results