Viewing error output when using “Run Now”
-
We’ve been using this plugin for years and love how much easier it makes managing and testing our custom plugins’ cron functions.
One issue that we’ve noticed, though, is that when we use the “Run Now” function, any errors will cause the function to silently fail without producing any output anywhere.
For example, if we use the Run Now function to run a cron with this code:
error_log('error test 1'); $error_test = 5 / 0; error_log('error test 2');
The last line of the Apache error log will say “error test 1”.
Since PHP and Apache can be configured in many different ways, this may not happen everywhere, but it may be worth looking into to see if there’s some type of fallback option that can be added. In our case, we’re using Cloudways as our managed host.
Thankfully, in our case, we can still view the errors by manually setting the cron to a past date and then wait for our system crontab to run the crons and output the errors to a custom log file, which works well. But if there was a way to get the Run Now function to work correctly as well, that would be very helpful.
- The topic ‘Viewing error output when using “Run Now”’ is closed to new replies.