Support » Plugin: Cronjob Scheduler » Cronjob Scheduler jobs show dates in the past

  • Resolved jdoe87165

    (@jdoe87165)


    Hi Chris,

    We’re noticing that the Cronjob Scheduler shows dates in the past for the next run on all cron jobs. The dates are from around a month ago on most jobs but they appear to be stuck at the time the cron job was last created. A manual run is always successful so far as we can tell. I’ve added the requested line to root’s crontab:

    * * * * * wget -qO- “https://10.100.0.50/wp-cron.php?doing_wp_cron” &>/dev/null

    although it should be noted the above ip is the internal ip of the server itself. Users connect to it on a NATted ip along the lines of:

    10.200.0.75

    The timezone settings are for New York although I previously had it at UTC -4. /var/log/cron shows the jobs running every minute as expected.

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author chrispage1

    (@chrispage1)

    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 9 months, 2 weeks ago by jdoe87165.
    Plugin Author chrispage1

    (@chrispage1)

    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 9 months, 2 weeks ago by jdoe87165.
    Plugin Author chrispage1

    (@chrispage1)

    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!

    Plugin Author chrispage1

    (@chrispage1)

    P.s. if you like the plugin is greatly appreciate it if you could leave your feedback as a review 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Cronjob Scheduler jobs show dates in the past’ is closed to new replies.