Check Which Cron Jobs Failed or Ran Slow This Week with WP Crontrol and AI
A weekly report of failed and slow background jobs from WP Crontrol's logs, with the latest error of each explained.
Prerequisites
A site connected to WPVibe running WP Crontrol 2.0 or newer (tested on 2.0.0, free) on WordPress 6.9 or newer, with an administrator account.
My WordPress site uses WP Crontrol. Tell me which background jobs failed or ran slow this week. 1. Run discover_abilities with category wp-crontrol. If the ability this needs is not there, stop and tell me to install or update the free WP Crontrol plugin (2.0 or newer, on WordPress 6.9 or newer). 2. Run wp-crontrol/get-insights. If logging_enabled is false, or it reports no runs, go to step 6. 3. Report the totals (runs, failures, how many hooks), then every hook with failures or fatals, and the slowest hooks with their average and longest time. If hooks_truncated is true, say the breakdown lists 50 hooks. 4. For each hook with failures, run wp-crontrol/list-logs with that hook, status errored and per_page 1, then wp-crontrol/get-log on that run, and explain the error in one sentence. 5. Whether or not anything failed, run wp-crontrol/list-logs once with status completed, hours 168 and per_page 100, and while next_before is not null run it again with before set to next_before (at most 5 pages; say so if you stopped early). Name any hook whose runs show emails_failed above 0 or warning true: they completed but something inside them failed. Tell me that only the hooks in logged_hooks are watched, and name them. Change nothing. 6. If nothing is logged yet, tell me logging is off until it is turned on per job, so there is nothing to report. Run wp-crontrol/list-events with type custom and per_page 200, leave out events with has_action false and hooks starting with crontrol/, and suggest up to eight worth watching (backups, emails and digests, imports and syncs), saying what each does. Jobs that run through Action Scheduler, such as WooCommerce's, are not in this list. Ask me which to log. Turn logging on only for the ones I pick with wp-crontrol/set-hook-logging and enabled true, confirm each returns logged true, and tell me to ask again in a week.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Check Which Cron Jobs Failed or Ran Slow This Week with WP Crontrol and AI” recipe from the WPVibe cookbook on my connected site.
Your site runs dozens of jobs in the background: backups, emails, renewals, feed and stock syncs, cleanups. Most weeks you only learn one stopped working when a customer notices.
The AI reads WP Crontrol’s summary of the last seven days, names every job that failed or ran slow, opens the latest failure of each and explains it in a sentence. If logging isn’t on yet, it lists the jobs worth watching on your site and turns logging on only for the ones you pick.
WP Crontrol records only the jobs you turn logging on for, and keeps their runs for up to 30 days. Logging adds a database row each time a job runs, so watch the jobs that matter rather than everything. Ask again in a week for the first real report. To dig into one failure, use this recipe.
Outcome
A short report of this week's failed and slow jobs with their causes, or logging switched on for the jobs you chose so next week's report has data.