Download the PHP package soderlind/dss-cron without Composer

On this page you can find all versions of the php package soderlind/dss-cron. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dss-cron

All Sites Cron

Run wp-cron on all public sites in a multisite network (REST API based).

"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.

🚀 Quick Start

  1. Download all-sites-cron.zip
  2. Upload via Network > Plugins > Add New > Upload Plugin
  3. Network Activate the plugin.
  4. Disable WordPress default cron in wp-config.php:

Also available via Composer:

Updates

🏗 Architecture (v2.0.0)

The plugin is organised as a thin orchestrator (all-sites-cron.php) backed by five focused classes under src/:

Class Responsibility
Lock Atomic execution lock (wp_cache_add / INSERT IGNORE)
Redis_Queue Redis job queue with connection lifecycle and retry tracking
Cron_Runner Batched get_sites() iteration and fire-and-forget wp_remote_post
Auth Optional shared-secret authentication (Bearer header / ?token=)
Response REST response builders and connection-close helpers

All classes live in the Soderlind\Multisite\AllSitesCron namespace and are autoloaded via Composer PSR-4.

đź”§ Configuration

The plugin exposes a REST API route that triggers cron across your network.

JSON usage:

GitHub Actions plain text (add ?ga=1):

Deferred mode (add ?defer=1 - responds immediately, processes in background):

🚀 Redis Queue Support: If Redis is available, deferred mode automatically uses Redis for job queuing (more reliable and scalable). See Quick Start.

Combine parameters (GitHub Actions + Deferred):

Adding ?ga=1 outputs results in GitHub Actions compatible format:

Example GitHub Action success notice

⏰ Trigger Options

  1. (Preferred) Use a service like cron-job.org, pingdom.com, or easycron.com to call the endpoint every 5 minutes.

  2. System Crontab (every 5 minutes):

  3. GitHub Actions every 5 minutes. (5 minutes is the shortest interval in GitHub Actions):

Note: Using defer=1 is recommended for GitHub Actions to prevent timeout errors on large networks.

đź”’ Authentication (Optional)

By default the REST endpoints are public (backward-compatible). To require a shared-secret token:

  1. Define the token in wp-config.php:

    Or store it as a site option: update_site_option( 'all_sites_cron_auth_token', 'your-secret' );

  2. Pass the token with requests:

When no token is configured the endpoints remain open.

Customization

Filters

Below is a complete list of filters provided by the plugin (including Redis + legacy aliases) that let you tune execution, performance, and infrastructure behavior.

Filter Type Default Purpose Since
all_sites_cron_rate_limit_seconds int 60 Cooldown between runs (rate limiting) 1.2.0
all_sites_cron_number_of_sites int 1000 Max sites processed in one invocation 1.0.7 (renamed 1.3.0)
all_sites_cron_batch_size int 50 Sites processed per batch (memory control) 1.3.0
all_sites_cron_request_timeout float 0.01 HTTP timeout per site cron dispatch (non-blocking) 1.0.6 (renamed 1.3.0)
all_sites_cron_use_redis_queue bool is_redis_available() Whether deferred mode should use Redis queuing 1.5.0
all_sites_cron_redis_host string 127.0.0.1 Redis host for queue operations 1.5.0
all_sites_cron_redis_port int 6379 Redis port 1.5.0
all_sites_cron_redis_db int 0 Redis database index 1.5.0
all_sites_cron_redis_queue_key string all_sites_cron:jobs Redis key (list) that stores queued jobs 1.5.0
https_local_ssl_verify bool false (contextual) Core WP: SSL verification for local HTTP (core)

Notes:

  • https_local_ssl_verify is a WordPress core filter, not defined by this plugin; we simply honor it when dispatching non‑blocking HTTP requests. See core docs for broader usage.
  • Legacy dss_cron_* filters are still applied first internally (for backward compatibility) via the get_filter() helper, then the newer all_sites_cron_* version. Migrate to the new names; legacy ones will be removed in a future major release.

Examples

Rate limiting:

Limit total sites:

Batch size:

Request timeout:

all_sites_cron_require_auth

Control whether authentication is required for REST endpoints.

https_local_ssl_verify

Redis connection:

Custom queue key:

Enable SSL verification (core filter):

Filter Usage Examples

Large Network Configuration (1000+ sites):

Small Network Configuration (< 100 sites):

Development/Testing Configuration:

Legacy Filters (Deprecated)

Legacy aliases still applied (old → new):

Legacy Current Notes
dss_cron_rate_limit_seconds all_sites_cron_rate_limit_seconds Cooldown between runs
dss_cron_number_of_sites all_sites_cron_number_of_sites Total sites cap
dss_cron_request_timeout all_sites_cron_request_timeout Per-site HTTP timeout
dss_cron_sites_transient (removed) Removed in 1.3.0 (batch processing made it obsolete)

Migration tip:

Using the Incoming Filter Parameter

All filter callbacks receive the current value as the first parameter. You can modify relative to the incoming value instead of hard‑coding:

Interpreting Rate Limiting

If called again before the cooldown finishes the API returns HTTP 429 with JSON:

Headers include: Retry-After: <seconds>.

Benefits of REST mode

Copyright and License

All Sites Cron is copyright 2024–2025 Per Soderlind

All Sites 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.

All Sites 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.

You should have received a copy of the GNU Lesser General Public License along with the Extension. If not, see http://www.gnu.org/licenses/.


Migration Note

The plugin was renamed from "DSS Cron" (slug: dss-cron) to "All Sites Cron" (slug: all-sites-cron). The old REST namespace dss-cron/v1 is still registered for backward compatibility, but you should migrate your automation scripts to use all-sites-cron/v1. Legacy WordPress filters like dss_cron_number_of_sites continue to work; new code should use the all_sites_cron_* equivalents.


All versions of dss-cron with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
yahnis-elsts/plugin-update-checker Version ^5.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package soderlind/dss-cron contains the following files

Loading the files please wait ...