Skip to content

Instantly share code, notes, and snippets.

@xorinzor
Last active April 17, 2025 12:00
Show Gist options
  • Save xorinzor/7aeebd6ffa09335d93dbf7347da7bbce to your computer and use it in GitHub Desktop.
Save xorinzor/7aeebd6ffa09335d93dbf7347da7bbce to your computer and use it in GitHub Desktop.
Kubernetes CronJob for Bitnami Wordpress
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: wp-cron
spec:
schedule: "*/1 * * * *"
successfulJobsHistoryLimit: 1
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
containers:
- name: wp-cron
image: busybox:latest
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
- wget -q https://{{ .Values.ingress.hostname }}/wp-cron.php?doing_wp_cron
restartPolicy: OnFailure
@xorinzor
Copy link
Author

When following the instructions from https://docs.bitnami.com/general/apps/wordpress/configuration/disable-wordpress-cron/

Make sure you add the following to your wp-config.php:

define('DISABLE_WP_CRON', true);

This CronJob will replace the crontab suggested by Bitnami for kubernetes instances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment