Y
Y
Yarik Yarik2021-11-25 20:37:48
Task Schedulers
Yarik Yarik, 2021-11-25 20:37:48

The problem of overdue publication, how to configure server cron?

I tried many commands, wrote to cronjobs:

*/2 * * * * /usr/local/bin/php /home/username/public_html/wp-cron
*/2 * * * * php -q /home/username/public_html/cron/cron.php
*/2 * * * * wget -O - -q -t 1 https://username/wp-cron.php
*/1 * * * * cd /var/www/wp; php /var/www/wp/wp-cron.php?doing_wp_cron > /dev/null 2>&1

Everything in this spirit - nothing helps. What am I doing wrong??? I use cPanel WordPress is clean.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karabanov, 2021-11-25
@karabanov

If we are talking about the wp-cron.php that is located in the root directory, then

*/2 * * * * /путь/до/php /путь/до/корневой/директории/wp-cron.php
You can find out the path to PHP with the commandwhich php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question