Hi,
By the sounds of the issue you are experiencing, I’d say that the cron is not getting fired for some reason – that might be down to the server its being run on or connectivity issues. Would it be possible to record the output of the cron to file and see what’s happening there?
Just to confirm also, when you manually run, the timestamp gets updated to the correct time?
I’ll see about redirecting from /dev/null to a file. When manually updated, there is no change on the next run time.
I’ve changed crontab to:
* * * * * wget -qO- “https://10.100.0.50/wp-cron.php?doing_wp_cron” &>>/root/cron_wpcronjob
Which appears to run under:
/var/log/cron
but doesn’t produce output. Manually running the wget command creates the expected cron_wpcronjob file but this is the output:
-bash: anaconda-ks.cfg: command not found
So it appears my formatting for the cronjob bash command is wrong. Suggestions welcome
-
This reply was modified 3 years, 9 months ago by
jdoe87165.
I think you need to work out the absolute path to your wget method and ensure wget actually exists on your machine (most likely it does).
In your terminal, type which wget
. The output of this will be something like /usr/bin/wget
. Based on this, you need to adjust your cron, e.g. –
* * * * * /usr/bin/wget -qO- "https://10.100.0.50/wp-cron.php?doing_wp_cron" &>>/root/cron_wpcronjob
Hope this helps!
Yeah, I just found another thread posting that using an absolute path may fix the issue. However, no dice. Then it occurred to me that wget’s q switch is suppressing the output and in theory, the o switch’s logging output. Ran the command manually without the q option and found that wget fails because it doesn’t like the self-signed certificate we’re using. Added:
–no-check-certificate
There are two dashes before “no” in the above blockquote.
option to the crontab and all times were up-to-date. For those of you running uBlock Origin plugin or similar adblocker, disable it for this site. Otherwise, you won’t necessarily see the cronjob timestamps updating on the WordPress site. Everything looks good so I’ll mark as resolved and open (edit?) another thread if need be. Thanks for the help Chris!
-
This reply was modified 3 years, 9 months ago by
jdoe87165.
No problem, pleased you got it sorted. Thanks for the detailed responses too as I’m sure it’ll help others who experience the same issues!
P.s. if you like the plugin is greatly appreciate it if you could leave your feedback as a review 🙂