Cron job metadata
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Confirmed
|
Wishlist
|
Kenneth Hendricks |
Bug Description
Hello,
Currently the meta data stored for cron jobs is fairly limited having only the following fields:
<TABLE NAME="cron">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true" />
<FIELD NAME="callfunction" TYPE="char" LENGTH="255" NOTNULL="true" />
<FIELD NAME="nextrun" TYPE="datetime" NOTNULL="false" />
<FIELD NAME="minute" TYPE="char" LENGTH="25" NOTNULL="true" DEFAULT="*" />
<FIELD NAME="hour" TYPE="char" LENGTH="25" NOTNULL="true" DEFAULT="*" />
<FIELD NAME="day" TYPE="char" LENGTH="25" NOTNULL="true" DEFAULT="*" />
<FIELD NAME="month" TYPE="char" LENGTH="25" NOTNULL="true" DEFAULT="*" />
<FIELD NAME="dayofweek" TYPE="char" LENGTH="25" NOTNULL="true" DEFAULT="*" />
</FIELDS>
We are implementing a plugin for Mahara that will mirror the cron check functionality present in this Moodle plugin: https:/
It would be beneficial if Mahara included two new fields in the cron and the plugintype_cron tables:
1. lastruntime - the last runtime of the cron job.
Currently on /admin/
record_
2. faildelay - An Exponentially increasing fail delay that is updated when the cron job fails (if it throws an exception). This way if there is a consistently failing cron job its execution is throttled and its failure is being tracked in some way aside from just logging an error. The heartbeat plugin above uses this to help us to identify and fix issues that would otherwise go undetected.
Aside from the benefits from a monitoring perspective, these fields provide useful information when it comes to debugging anything cron related.
I'm happy to discuss at any time and more than happy to do the dev on this. Ill be floating around the Mahara IRC under the kenH handle if you would like to talk at any time.
Thanks,
Kenneth
Changed in mahara: | |
assignee: | nobody → Kenneth Hendricks (kennethhendricks) |
milestone: | none → 17.10.0 |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in mahara: | |
milestone: | 17.10.0 → 18.04.0 |
Changed in mahara: | |
milestone: | 18.04.0 → 18.10.0 |
Changed in mahara: | |
importance: | Medium → Wishlist |
milestone: | 18.10.0 → none |
Hi Kenneth
What you propose in indeed something that Mahara could use!
And I am more than happy to answer any questions you have if you were to take on the dev for this.
Cheers
Robert