{"id":20286405,"url":"https://github.com/antoonline/bash-script-wordpress-docker-run-cron","last_synced_at":"2026-05-07T01:09:12.590Z","repository":{"id":158575305,"uuid":"632406528","full_name":"AntoOnline/bash-script-wordpress-docker-run-cron","owner":"AntoOnline","description":"This script locates running WordPress instances in Docker containers and triggers the execution of their cron jobs. It iterates through each WordPress instance, changes to the WordPress root directory inside the container, and runs the `wp-cron.php` script as the `www-data` user. ","archived":false,"fork":false,"pushed_at":"2023-04-30T23:38:56.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T08:14:15.636Z","etag":null,"topics":["cron","docker","ubuntu","wordpress"],"latest_commit_sha":null,"homepage":"https://anto.online","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AntoOnline.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-25T10:46:05.000Z","updated_at":"2023-04-29T20:30:43.000Z","dependencies_parsed_at":"2023-05-21T01:00:13.943Z","dependency_job_id":null,"html_url":"https://github.com/AntoOnline/bash-script-wordpress-docker-run-cron","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntoOnline%2Fbash-script-wordpress-docker-run-cron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntoOnline%2Fbash-script-wordpress-docker-run-cron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntoOnline%2Fbash-script-wordpress-docker-run-cron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntoOnline%2Fbash-script-wordpress-docker-run-cron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AntoOnline","download_url":"https://codeload.github.com/AntoOnline/bash-script-wordpress-docker-run-cron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241780500,"owners_count":20019061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cron","docker","ubuntu","wordpress"],"created_at":"2024-11-14T14:33:58.996Z","updated_at":"2025-09-16T20:49:33.084Z","avatar_url":"https://github.com/AntoOnline.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Cron Runner\n\nThis script is designed to run the WordPress cron (`wp-cron.php`) for all running Docker containers with a WordPress instance.\n\n## Requirements\n\n- Docker\n- Bash\n\n## Usage\n\n1. Make sure the `wordpress-docker-run-cron.sh` script is executable:\n\n```\nchmod +x wordpress-docker-run-cron.sh\n```\n\n2. Run the script:\n\n```\n./wordpress-docker-run-cron.sh\n```\n\nThe script will identify all running Docker containers with a WordPress instance, and then execute the `wp-cron.php` file for each of them.\n\n## How it works\n\nThe script performs the following steps:\n\n1. Retrieves the container names of all running WordPress instances.\n2. Iterates through the container names and runs the `wp-cron.php` file for each instance.\n\nThe script will output the container names of the running WordPress instances and display a message indicating that the cron has been run for each instance. After completing the process for all instances, the script will display a message indicating that all WordPress instances have run the cron.\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Want to connect?\n\nFeel free to contact me on [Twitter](https://twitter.com/OnlineAnto), [DEV Community](https://dev.to/antoonline/) or [LinkedIn](https://www.linkedin.com/in/anto-online) if you have any questions or suggestions.\n\nOr just visit my [website](https://anto.online) to see what I do.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoonline%2Fbash-script-wordpress-docker-run-cron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoonline%2Fbash-script-wordpress-docker-run-cron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoonline%2Fbash-script-wordpress-docker-run-cron/lists"}