Skip to content

Commit

Permalink
feat: wp-cron in worker
Browse files Browse the repository at this point in the history
  • Loading branch information
batonac committed Sep 12, 2024
1 parent ec51ec9 commit 424bcd8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,13 @@ fi
# cp -r /mu-plugins /var/www/html/wp-content/mu-plugins
# chmod 755 /var/www/html/wp-content/mu-plugins

# if PROC_TYPE=worker, then run cron jobs on the minute via wp-cli
if [ "$PROC_TYPE" = "worker" ]; then
echo "Running cron jobs on the minute"
while true; do
wp cron event run --all --due-now --allow-root
sleep 60
done
fi

exec "$@"

0 comments on commit 424bcd8

Please sign in to comment.