File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,9 @@ install_if_not apt-transport-https
158158# Install build-essentials to get make
159159install_if_not build-essential
160160
161+ # Needed for cron(tab)
162+ install_if_not cron
163+
161164# Set DNS resolver
162165# https://unix.stackexchange.com/questions/442598/how-to-configure-systemd-resolved-and-systemd-networkd-to-use-local-dns-server-f
163166while :
@@ -522,10 +525,10 @@ mv "$PHP_POOL_DIR"/www.conf "$PHP_POOL_DIR"/www.conf.backup
522525restart_webserver
523526
524527# Force wp-cron.php (updates WooCommerce Services and run Scheluded Tasks)
525- if [ -f " $WPATH /wp-cron.php" ]
528+ if [ -f " $WPATH /wp-cron.php" ] && [ -f $WPATH /wp-cli.yml ]
526529then
527530 chmod +x " $WPATH /wp-cron.php"
528- crontab -u www-data -l | { cat; echo " 14 */1 * * * php -f $WPATH /wp- cron.php > /dev/null 2>&1" ; } | crontab -u www-data -
531+ crontab -u www-data -l | { cat; echo " 14 */1 * * * wp cron event run --due-now --path='/var/www/html/wordpress' > 2>&1" ; } | crontab -u www-data -
529532fi
530533
531534# Install Figlet
You can’t perform that action at this time.
0 commit comments