Answers.Body: <p>This one may have been something as simple as a bad username in my CRON script. I say <em>may</em> have been because scheduled jobs are running again, but not consistently. It seems that they run automatically whenever I'm logged into SHELL, but not when I'm logged out.</p>
  
  <p>More to the point of this question, I'd been successfully using an email address as the username in the CRON script. This worked for about three days. When I changed the email address to the WP username, it started working again -- but only (I think) until logged out of SHELL. Currently I'm testing to verify a causal relationship, and if one exists, I'll post a new question.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-24T17:15:52.433Z
Answers.Text: Did you ever solve this conclusively?  I'm seeing this on a CPanel cron...
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-08T18:52:59.303Z
Answers.LastActivityDate: 2017-08-08T18:52:59.303Z
Answers.UserDisplayName: Prónay
Body: <p>CRON was behaving as expected for a few days, but now I'm getting this:
  <code>Warning: fwrite() expects parameter 1 to be resource, string given in [REDACTED]/WP_CLI/Loggers/Base.php on line 57</code></p>
  
  <p>Any idea what's causing this?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-30T03:14:37.153Z
Comments.Text: This is what's at line 57:
  `if (!is_object($name_of_param_1)) {
    print "WHOOAAAAA, $name_of_param_1 is not an object, it is a: " . $name_of_param_1;
    die();
  }`
  Still trying to make sense of it. I'm not aware of any changes in our settings or scripts, yet from one day to the next our working CRON-triggered tasks stopped working.
Comments.UserDisplayName: Prónay
Tags: <wordpress><cron-job><cron><wp>
Title: Another CRON headache: fwrite() expects parameter 1 to be resource, string given in … /WP_CLI/Loggers/Base.php
ThreadText: # Another CRON headache: fwrite() expects parameter 1 to be resource, string given in … /WP_CLI/Loggers/Base.php
  
  (Asked by: username_0 on 2017-07-25)
  
  CRON was behaving as expected for a few days, but now I'm getting this:
  `Warning: fwrite() expects parameter 1 to be resource, string given in [REDACTED]/WP_CLI/Loggers/Base.php on line 57`
  
  Any idea what's causing this?
  
  **Tags:** wordpress, cron-job, cron, wp
  
  > **Comments:**
  > **username_0**: This is what's at line 57: `if (!is_object($name_of_param_1)) {   print "WHOOAAAAA, $name_of_param_1 is not an object, it is a: " . $name_of_param_1;   die(); }` Still trying to make sense of it. I'm not aware of any changes in our settings or scripts, yet from one day to the next our working CRON-triggered tasks stopped working.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-08-08. Score: 0 | Accepted answer
  
  This one may have been something as simple as a bad username in my CRON script. I say *may* have been because scheduled jobs are running again, but not consistently. It seems that they run automatically whenever I'm logged into SHELL, but not when I'm logged out.
  
  More to the point of this question, I'd been successfully using an email address as the username in the CRON script. This worked for about three days. When I changed the email address to the WP username, it started working again -- but only (I think) until logged out of SHELL. Currently I'm testing to verify a causal relationship, and if one exists, I'll post a new question.
  
  > **Comments:**
  > **username_1**: Did you ever solve this conclusively?  I'm seeing this on a CPanel cron...  
  
  ---
  
  