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?

  • 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.
    – Prónay
    Commented Jul 30, 2017 at 3:14

1 Answer 1


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.

  • Did you ever solve this conclusively? I'm seeing this on a CPanel cron... Commented Apr 24, 2020 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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