In my wp-config.php
, I have
define('DISABLE_WP_CRON', true);
I am on a Mac (Catalina), and if I run from the terminal crontab - l
I see
* * * * * wget -q -O - 'https://mysiite.com/wp-cron.php?doing_wp_cron&cron=true'; echo "wordpresscron" >> /somepath/stdout.log
In my log file, I see wordpresscron
being echoed.
But when I view my apache access log I don't see any GET
requests related to the cron.
Now, if I manually enter at the terminal
wget -q -O - 'https://mysiite.com/wp-cron.php?doing_wp_cron&cron=true'
An entry gets written into the apache access log.
So I just can't figure out what is going on. Seems my cron is working, but apache log is not showing this...
Ideas?
Edit:
Maybe this has something to do with the fact that I am changing the system time on my MAC to test the triggering of events?
For instance, take a look at this output showing jobs that are pending:
So there are some jobs to run. If I type from the terminal
wp cron event run --due-now
These pending jobs all get immediately completed. I modified my crontab a bit, it is now
* * * * * cd /sitefolder; wp cron event run --due-now; echo "ran cron" >> /users/brian/sites/stdout.log
And I see ran cron
being echoed to the log.
So I am truly at a loss. It is as if the cron is running, and when the wp cron event run --due-now
command is issued, it is ignored, and I can't imagine the conditions under which it might be ignored when ran as a cron. Maybe when ran as cron it is being ignored because it sees that I made a system time change (although I can't imagine why that would cause a command to be ignored). Or could it be a weird permissons issue, in which case at command line I have permissions to run wp cron event run --due-now
, but the cron job somehow does not have permission?
Anyway, this is driving me nuts.