Skip to content

Commit

Permalink
Fix wp cron call and have it run every three hours
Browse files Browse the repository at this point in the history
  • Loading branch information
mikethicke committed Sep 17, 2024
1 parent 178796d commit a7d4bb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/cron/commons.crontab
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
# Run wp-cron for base sites once per hour
0 * * * * [ "$RUN_CRON" = "true" ] && /app/scripts/cron/all_networks_wp.bash cron event run --due-now

# Run wp-cron once per day
0 1 * * * [ "$RUN_CRON" = "true" ] && wp site list --field=url | xargs -i -n1 sudo -u www-data /usr/local/bin/wp --path=/srv/www/commons/current/web/wp cron event run --due-now --url="{}"
# Run wp-cron for all sites every 3 hours
30 */3 * * * [ "$RUN_CRON" = "true" ] && wp site list --field=url | xargs -i -n1 wp cron event run --due-now --url="{}"

0 comments on commit a7d4bb0

Please sign in to comment.