{"id":30302680,"url":"https://github.com/soderlind/dss-cron","last_synced_at":"2025-08-17T05:09:57.117Z","repository":{"id":263615403,"uuid":"890938452","full_name":"soderlind/dss-cron","owner":"soderlind","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-09T16:20:19.000Z","size":231,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-16T06:58:30.770Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soderlind.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2024-11-19T12:55:37.000Z","updated_at":"2025-08-09T16:20:22.000Z","dependencies_parsed_at":"2024-11-19T14:37:15.401Z","dependency_job_id":"142bdfd8-8d41-4e3b-a056-8db9c1eacd14","html_url":"https://github.com/soderlind/dss-cron","commit_stats":null,"previous_names":["soderlind/dss-cron"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/soderlind/dss-cron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soderlind%2Fdss-cron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soderlind%2Fdss-cron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soderlind%2Fdss-cron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soderlind%2Fdss-cron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soderlind","download_url":"https://codeload.github.com/soderlind/dss-cron/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soderlind%2Fdss-cron/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270696327,"owners_count":24629795,"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","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-08-17T05:09:56.490Z","updated_at":"2025-08-17T05:09:57.092Z","avatar_url":"https://github.com/soderlind.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e # [Use DIO Cron instead](https://github.com/soderlind/dio-cron?tab=readme-ov-file#dio-cron)\n\n# DSS Cron\n\nRun wp-cron on all public sites in a multisite network\n\n\u003e \"You could have done this with a simple cron job. Why use this plugin?\" I have a cluster of WordPress sites. I did run a shell script calling wp cli, but the race condition was a problem. I needed a way to run wp-cron on all sites without overlapping. This plugin was created to solve that problem.\n\n## 🚀 Quick Start\n\n1. Upload `dss-cron` to `/wp-content/plugins/`\n2. Network activate via 'Network-\u003ePlugins'\n3. Disable WordPress default cron in `wp-config.php`:\n   ```php\n   define( 'DISABLE_WP_CRON', true );\n   ```\n\nAlso available via Composer:\n\n```bash\ncomposer require soderlind/dss-cron\n```\n\n## 🔧 Configuration\n\nThe plugin creates an endpoint at /dss-cron that triggers cron jobs across your network.\n\nUsage: `https://example.com/dss-cron`\n\nAdding ?ga to the URL (e.g., `https://example.com/dss-cron?ga`) will output results in GitHub Actions compatible format:\n\n- Success: `::notice::Running wp-cron on X sites`\n- Error: `::error::Error message`\n\n  Example GitHub Action success notice:\n\n  \u003cimg src=\"assets/ga-output.png\" alt=\"GitHub Action - Success notice\" style=\"with: 60%\"\u003e\n\n## ⏰ Trigger Options\n\n1. System Crontab (every 5 minutes):\n\n```bash\n*/5 * * * * curl -s https://example.com/dss-cron\n```\n\n2. GitHub Actions (every 5 minutes. 5 minutes is the [shortest interval in GitHub Actions](https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule)):\n\n```yaml\nname: DSS Cron Job\non:\n  schedule:\n    - cron: '*/5 * * * *'\n\nenv:\n  CRON_ENDPOINT: 'https://example/dss-cron/?ga'\n\njobs:\n  trigger_cron:\n    runs-on: ubuntu-latest\n    timeout-minutes: 5\n    steps:\n      - run: |\n          curl -X GET ${{ env.CRON_ENDPOINT }} \\\n            --connect-timeout 10 \\\n            --max-time 30 \\\n            --retry 3 \\\n            --retry-delay 5 \\\n            --silent \\\n            --show-error \\\n            --fail\n```\n\n## Customization\n\nAdjust maximum sites processed per request (default: 200):\n\n```php\nadd_filter( 'dss_cron_number_of_sites', function( $sites_per_request ) {\n\treturn 200;\n});\n```\n\nAdjust transient expiration time (default: 1 hour):\n\n```php\nadd_filter( 'dss_cron_transient_expiration', function( $expiration ) {\n\treturn HOUR_IN_SECONDS;\n});\n```\n\n## Copyright and License\n\nDSS Cron is copyright 2024 Per Soderlind\n\nDSS Cron is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.\n\nDSS Cron is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License along with the Extension. If not, see http://www.gnu.org/licenses/.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoderlind%2Fdss-cron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoderlind%2Fdss-cron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoderlind%2Fdss-cron/lists"}