Answers.Body: <p>You can apply this change or wait for 5.81 next week <a href="https://github.com/civicrm/civicrm-core/pull/31624/files" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/31624/files</a></p>
  <pre><code>diff --git a/CRM/Core/JobManager.php b/CRM/Core/JobManager.php
  index 3d5ff0d8293..96ff3fada78 100644
  --- a/CRM/Core/JobManager.php
  +++ b/CRM/Core/JobManager.php
  @@ -90,7 +90,7 @@ public function execute($auth = TRUE) {
       $jobs = array_merge($successfulJobs, $maybeUnsuccessfulJobs);
       foreach ($jobs as $job) {
         $temp = ['class' =&gt; NULL, 'parameters' =&gt; NULL, 'last_run' =&gt; NULL];
  -      $scheduledJobParams = array_merge($job, $temp);
  +      $scheduledJobParams = array_merge($temp, $job);
         $jobDAO = new CRM_Core_ScheduledJob($scheduledJobParams);
   
         if ($jobDAO-&gt;needsRunning()) {
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-30T01:17:52.703Z
Answers.Text: Yeah, that’d do it. Thanks, patch works.
Answers.UserDisplayName: Michael Matthews
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-30T17:10:50.380Z
Answers.Text: Thanks. Patch worked for me too. Jobs broke for me also after upgrading to 5.80.1.
Answers.UserDisplayName: Justin657
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-29T16:25:01.747Z
Answers.LastActivityDate: 2024-12-29T16:25:01.747Z
Answers.UserDisplayName: Demerit
Body: <p>I set up a weekly scheduled job to run a report. It was working fine until I updated to 5.80.1 from 5.78.x. If I execute the job manually from the web UI it works fine. When it's run via schedule (either using the cv, which worked fine before, or wp-cli as an attempt to see if maybe the latest cv also needs an update, command in cron), it fails with:</p>
  <p>Finished execution of Weekly Nametag Report with result: Failure, Error message: Report Mail Triggered...
  Did not find a valid instance to execute</p>
  <p>I've also noticed that the failure message API list is</p>
  <p>a:1:{s:7:&quot;version&quot;;i:3;}</p>
  <p>while the working log entry has:</p>
  <p>a:4:{s:7:&quot;version&quot;;i:3;s:10:&quot;instanceId&quot;;s:2:&quot;42&quot;;s:6:&quot;format&quot;;s:3:&quot;csv&quot;;s:8:&quot;sendmail&quot;;s:1:&quot;1&quot;;}</p>
  <p>The scheduled job config hasn't changed, and still seems to be what the docs suggest it should be:
  <a href="https://i.sstatic.net/19X7peV3.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/19X7peV3.png" alt="screen capture of scheduled job config" /></a></p>
  <p>Haven't found anything in the release notes that gives me any clue as to why this isn't working any more.</p>
  <p>What silly thing have I missed?</p>
  <p>Thanks...</p>
  
Tags: <scheduled-job><custom-reports><failure>
Title: Scheduled jobs failing after 5.80.1 upgrade
ThreadText: # Scheduled jobs failing after 5.80.1 upgrade
  
  (Asked by: username_0 on 2024-12-29)
  
  I set up a weekly scheduled job to run a report. It was working fine until I updated to 5.80.1 from 5.78.x. If I execute the job manually from the web UI it works fine. When it's run via schedule (either using the cv, which worked fine before, or wp-cli as an attempt to see if maybe the latest cv also needs an update, command in cron), it fails with:
  
  Finished execution of Weekly Nametag Report with result: Failure, Error message: Report Mail Triggered...
  Did not find a valid instance to execute
  
  I've also noticed that the failure message API list is
  
  a:1:{s:7:"version";i:3;}
  
  while the working log entry has:
  
  a:4:{s:7:"version";i:3;s:10:"instanceId";s:2:"42";s:6:"format";s:3:"csv";s:8:"sendmail";s:1:"1";}
  
  The scheduled job config hasn't changed, and still seems to be what the docs suggest it should be:
  [![screen capture of scheduled job config](https://i.sstatic.net/19X7peV3.png)](https://i.sstatic.net/19X7peV3.png)
  
  Haven't found anything in the release notes that gives me any clue as to why this isn't working any more.
  
  What silly thing have I missed?
  
  Thanks...
  
  **Tags:** scheduled-job, custom-reports, failure
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-12-29. Score: 1 | Accepted answer
  
  You can apply this change or wait for 5.81 next week https://github.com/civicrm/civicrm-core/pull/31624/files
  diff --git a/CRM/Core/JobManager.php b/CRM/Core/JobManager.php
  index 3d5ff0d8293..96ff3fada78 100644
  --- a/CRM/Core/JobManager.php
  +++ b/CRM/Core/JobManager.php
  @@ -90,7 +90,7 @@ public function execute($auth = TRUE) {
       $jobs = array_merge($successfulJobs, $maybeUnsuccessfulJobs);
       foreach ($jobs as $job) {
         $temp = ['class' => NULL, 'parameters' => NULL, 'last_run' => NULL];
  -      $scheduledJobParams = array_merge($job, $temp);
  +      $scheduledJobParams = array_merge($temp, $job);
         $jobDAO = new CRM_Core_ScheduledJob($scheduledJobParams);
   
         if ($jobDAO->needsRunning()) {
  
  > **Comments:**
  > **username_0**: Yeah, that’d do it. Thanks, patch works.  
  > **username_2**: Thanks. Patch worked for me too. Jobs broke for me also after upgrading to 5.80.1.  
  
  ---
  
  