Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-9822

Fatal error when running cli with -a execute AND -j options (execute all scheduled jobs AND logging enabled)

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.1.0
    • Fix Version/s: 4.1.2
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      The 'execute' action will ALWAYS write to the job log (-j is not needed). If you run a single job from cli.php - it will be logged if you pass in -j, otherwise no logging is done.

      I've also updated the "view Job Log" page to sort by job_log ID descending rather than run_time. Since several job log entries occur at the same time, this sort pattern more accurately shows the sequence of events.


      The root of the problem is in the code lines 62-66 in bin/cli.php. That condition is triggered by -j AND rather than using the Job api, it executes JobManager functions directly. This fails for 'execute' action because those lines are expecting a specific job action (e.g. process_mailing).

      In my tests, the -j parameter does NOT seem to be needed at all - since I'm getting output to the Job Log WITHOUT it.

      — original post ----
      PHP Fatal error: Call to a member function saveLastRun() on a non-object in civicrm/CRM/Core/JobManager.php on line 118

      As described here: http://forum.civicrm.org/index.php/topic,23468.msg99186.html#msg99186

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              clandmeter Carlo Landmeter
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: