| 开发者 | cronheart |
|---|---|
| 更新时间 | 2026年6月20日 15:05 |
| PHP版本: | 8.2 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
cronheart_monitor( 'my_nightly_report', 'xxxxxxxx-…' );error_get_last() summary — the cronheart dashboard shows the cause without you tailing debug.log.cronheart_monitor() helper and CRONHEART_EVENT_<HOOK>_UUID constants (both still work and take precedence).wp-config.php constants for production (CRONHEART_HEARTBEAT_UUID, CRONHEART_EVENT_<HOOK>_UUID), with admin-UI fallback for sites where editing wp-config.php is not practical.wp_schedule_event callbacks still run normally; you just stop seeing pings on the dashboard.
External services
This plugin sends HTTP requests to cronheart.com in two distinct situations: the monitoring pings your scheduled jobs send, and the account-management calls the admin settings page makes. Both are opt-in: without configuration the plugin loads and does nothing — no telemetry, no usage statistics, no anonymous reports.
1. Monitoring pings (front end / WP-Cron). Sent on every scheduled WP-Cron run, but only when you supply a monitor UUID. The exact data sent per ping:
fail pings) or nothing (for start / success / heartbeat).User-Agent header.https://cronheart.com/api/v1/.... Every such request carries the token as an Authorization: Bearer header and runs only while a logged-in administrator is on one of those screens — and, for the write actions below, only when that administrator clicks the control. Never on the front end, during WP-Cron, or in any other context. No token, no request. The calls are:
GET /api/v1/monitors — to populate the heartbeat picker, the "Your monitors" table, and the per-event assignment dropdowns. Sends nothing beyond the token.GET /api/v1/account — to show your plan, monitor budget, and API rate-limit standing. Sends nothing beyond the token.POST /api/v1/monitors/<uuid>/pause (or /resume, /snooze, /unsnooze) — sent when you click a pause / resume / snooze / unsnooze button. Sends the monitor's UUID (in the path) and the action; snooze also sends the chosen duration (1 hour, 4 hours, 1 day, or 1 week).POST /api/v1/monitors — sent when you click "Auto-create & assign" for a recurring event on the Cronheart Events screen. Sends the event's hook name (as the monitor name), its schedule as an interval in seconds, the site timezone, and a grace period — all derived from the WP-Cron schedule.cron-monitor/php-sdk PHP package (also open source, MIT-licensed). Both projects are maintained independently.
cronheart.zip from a GitHub release.wp-config.php with define( 'CRONHEART_HEARTBEAT_UUID', 'xxxxxxxx-…' ); (recommended), or paste it under Settings → Cronheart in the WP admin.heartbeat ping on the cronheart dashboard.define( 'CRONHEART_API_TOKEN', 'cmk_…' ); in wp-config.php to keep the account credential out of the database.add_action( 'plugins_loaded', function () { cronheart_monitor( 'my_nightly_report', 'xxxxxxxx-…' ); }, 1 );
The hook then emits start / success (or fail on a fatal / thrown exception) pings on every scheduled run.Yes. If you set define( 'DISABLE_WP_CRON', true ); and trigger wp-cron.php from a real system cron, the plugin's heartbeat_tick action still fires on each run — the trigger mechanism is different, the action chain is the same.
The plugin will retry once (built-in retry budget) and then log a warning to debug.log. Your scheduled callbacks still run normally — the plugin never raises an exception that could break the cron runner. To diagnose, check wp-content/debug.log for entries beginning with "cron-monitor".
No. Cronheart's free tier covers 20 monitors per account — enough for a typical site's heartbeat plus several per-event monitors. Paid tiers (Starter / Growth / Scale) raise the cap and unlock additional notification channels.
No — it is entirely optional. Paste a monitor UUID under Settings → Cronheart (or define it in wp-config.php) and the plugin works on any plan, including the free tier. A token only adds convenience: the settings page can then list your monitors and let you pick one from a dropdown instead of copying a UUID by hand. The token is an account-level credential, so for production prefer defining CRONHEART_API_TOKEN in wp-config.php over storing it in the database. The picker (API access) requires a Starter plan or higher; if your plan does not include it the page shows a notice and falls back to manual UUID entry.
Sign in at cronheart.com, open the monitor you created, and copy the UUID from the address bar or the "Ping URL" block on the monitor page.
Nothing. The plugin catches every network / HTTP error from the SDK and logs a warning — your wp_schedule_event callbacks continue to run. You will stop seeing pings on the cronheart dashboard, and after the configured grace period cronheart sends you the down-alert. When cronheart comes back the next successful ping resolves the incident automatically.
No. The plugin sends a ping to cronheart only when you have configured a monitor UUID. The ping payload is the UUID, an optional short body excerpt (capped at 10 KB), and the SDK's User-Agent header. There is no anonymous-statistics beacon, no plugin-usage telemetry, no calls to any third-party analytics service.
Yes. Define CRONHEART_ENDPOINT in wp-config.php with the URL of your alternate deployment. For plain http:// endpoints (local development, private VPNs without TLS) also set CRONHEART_ALLOW_INSECURE_ENDPOINT to true. With both unset, the plugin pings the production cronheart.com over HTTPS.
Open an issue on GitHub.
cronheart_monitor() helper and CRONHEART_EVENT_<HOOK>_UUID constants (both still work and still take precedence).manage_options, boundary validation, no public endpoint); the request hook is always validated against the discovered event set, and assigning a monitor is a local option write that needs no token. The live controls are token-gated like the heartbeat picker; without a token the screen is a read-only view.POST /api/v1/monitors), sent only when you click "Auto-create & assign".cron-monitor/php-sdk to ^1.1, which adds the account and monitor-lifecycle endpoints these features use.GET /api/v1/account) and write (POST /api/v1/monitors/<uuid>/{pause,resume,snooze,unsnooze}) calls; all remain wp-admin-only, token-gated, and triggered by an administrator's explicit action.cronheart_heartbeat_uuid option, so nothing changes about how pings are sent — only how you fill in the UUID.CRONHEART_API_TOKEN constant in wp-config.php.cron-monitor/php-sdk to ^1.0, which adds the authenticated management-API client the picker uses.Contributors: changed from cronmonitor to cronheart — the reviewer's static analysis pointed out that the WordPress.org account that actually owns the cronheart plugin slug (and uploaded every version including v0.1.8) is cronheart, not cronmonitor. v0.1.7's switch to cronmonitor was a wrong guess at the right owner identity; v0.1.9 puts the actual slug owner in the contributors line.wordpress:7.0-php8.2-apache; smoke run + Plugin Check re-verified green on 7.0.cronheart.com/legal/terms, cronheart.com/legal/privacy) were wrong paths — the live pages have always been at cronheart.com/terms and cronheart.com/privacy. v0.1.6 removed the links entirely as the most cautious response to the review feedback; v0.1.7 puts them back, pointing at the correct URLs (both return HTTP 200).cronheart.com/legal/* links from the readme that responded with HTTP 404. The "External services" section in this readme already provides a full data-flow disclosure; stand-alone Terms / Privacy pages will be linked back when the corresponding cronheart.com URLs are live.Contributors: set to cronmonitor (the WordPress.org account that submitted the plugin); previously held a stale GitHub handle (alexanderpo) that did not match any WP.org user.vendor/bin/cron-monitor or vendor/cron-monitor/php-sdk/bin/cron-monitor — those CLI binaries are part of the SDK's local-dev tooling and have no use inside a WordPress plugin. bin/build-release.sh now strips every vendor/*/bin/ directory at zip time. PSR-4 autoload of the SDK's runtime classes is unaffected.wordpress:6.9-php8.2-apache; smoke run + Plugin Check re-verified green on 6.9.CLAUDE.md and similar contributor-only docs from vendored packages; the bundled tree is now scoped to what the runtime actually needs.LICENSE gained an explicit project copyright header (cronheart-wp — Copyright (C) 2026 Alexander Palazok); the GPL-2.0 preamble follows unchanged.[0.1.1] section header restored; internal sprint-tracking term ("Sprint D") removed from the public 0.1.3 entry; stale "deferred to v0.1.1+" notes on vendor namespace prefixing rewritten to reflect the current "deferred pending first reported collision" stance.defined('ABSPATH') direct-access guards to every PHP file the static analyser reaches; refactored the monitored-events table render so the escape calls are direct printf arguments (the previous pre-assigned variable was flagged by EscapeOutput); shipped composer.json / composer.lock alongside vendor/ in the release zip so the bundled dependencies are reproducible.CRONHEART_ENDPOINT constant and cronheart_endpoint option for pointing the plugin at a non-production cronheart deployment (staging, private VPC, local backend).CRONHEART_ALLOW_INSECURE_ENDPOINT constant / cronheart_allow_insecure_endpoint option to opt into plain http:// endpoints (required for local backends behind host.docker.internal or TLS-less private VPNs; default false).devstack/ for verifying the plugin against either production cronheart.com (public contributors) or a local cron-monitor backend (maintainers).cronheart_monitor() helper and cronheart_monitor_map filter.CRONHEART_HEARTBEAT_UUID and CRONHEART_EVENT_<HOOK>_UUID constants for sourcing UUIDs from wp-config.php.wp-config.php access.