0

I kept checking the joblog and thought, wow, it sucks that it doesn't display the timestamp but just now I looked more closely and see that there is an actual "Date" column and all log entry values are blank for that field.

Sure enough all of the values for run_time in the job_log table are NULL. I updated one and refreshed the job log display in Civi and it showed up.

What is keeping the run_time value from being set??

UPDATE #1 : Well lookie there. What in the world would cause this schema? I didn't do anything special that I can recall.

mysql>  describe civicrm_job_log;
+-------------+------------------+------+-----+---------+----------------+
| Field       | Type             | Null | Key | Default | Extra          |
+-------------+------------------+------+-----+---------+----------------+
| id          | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| domain_id   | int(10) unsigned | NO   | MUL | NULL    |                |
| run_time    | timestamp        | YES  |     | NULL    |                |
| job_id      | int(10) unsigned | YES  |     | NULL    |                |
| name        | varchar(255)     | YES  |     | NULL    |                |
| command     | varchar(255)     | YES  |     | NULL    |                |
| description | varchar(255)     | YES  |     | NULL    |                |
| data        | text             | YES  |     | NULL    |                |
+-------------+------------------+------+-----+---------+----------------+

UPDATE #2 : I just performed a completely new Drupal 7.56, CiviCRM 4.7.29 install and before I did anything else I checked the schema for civicrm_job_log and it has the exact same problem - NULLable, without Default: CURRENT_TIMESTAMP, and without attribute on update CURRENT_TIMESTAMP.

Upon a more direct web search I ran across "The date is no longer kept in the scheduled job logs" in the CiviCRM Jira from Feb/March 2017. It has been closed by Nicolas as "most probably not related to CiviCRM". Not buying that unless somebody can explain.

Closed JIRA

https://issues.civicrm.org/jira/browse/CRM-20165

I just looked at a Civi 4.7.27 install I have and it does not have the same problem.

For now I guess I'll modify them manually but I'd like to know if anybody else running 4.7.29 (perhaps new vs upgraded) have the same problem.

2

The run_time field is set to current timestamp by default and its a not null field which mean that run_time will never NULL values. Can you please check you schema for civicrm_job_log. I am pasting below for CiviCRM version 4.7.29

mysql> DESCRIBE `civicrm_job_log`;
+-------------+------------------+------+-----+-------------------+-----------------------------+
| Field       | Type             | Null | Key | Default           | Extra                       |
+-------------+------------------+------+-----+-------------------+-----------------------------+
| id          | int(10) unsigned | NO   | PRI | NULL              | auto_increment              |
| domain_id   | int(10) unsigned | NO   | MUL | NULL              |                             |
| run_time    | timestamp        | NO   |     | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
| job_id      | int(10) unsigned | YES  |     | NULL              |                             |
| name        | varchar(255)     | YES  |     | NULL              |                             |
| command     | varchar(255)     | YES  |     | NULL              |                             |
| description | varchar(255)     | YES  |     | NULL              |                             |
| data        | text             | YES  |     | NULL              |                             |
+-------------+------------------+------+-----+-------------------+-----------------------------+
8 rows in set (0.00 sec)
  • Pradeep - please see my update. What would have caused that difference? – ferkenheimerschmidt Jan 6 '18 at 2:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.