brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: wp cron schedule list shows the intervals WordPress cron knows about

WordPress
~/tips/tip-wordpress-wp-cron-schedule-list

wp cron schedule list

Lists the available WordPress cron schedules, such as hourly and daily, with their intervals in seconds.

Scheduled events need a schedule name, like hourly. This command shows which names exist on your site, including those added by plugins.

wp cron schedule list
wp cron schedule list --fields=name --format=ids

The default output is a table with three fields, name, display and interval. A stock site shows hourly, twicedaily and daily, with intervals of 3600, 43200 and 86400 seconds.

--format can be table, csv, ids, json or yaml. The second command above prints the schedule names on one line, for example hourly twicedaily daily, which is handy in a script.

It is the first thing to check when a plugin asks for a custom interval, or when an event refuses to schedule because its recurrence name is unknown. If the plugin registers its schedule through the cron_schedules filter, it appears here once the plugin is active.

The caveat is that this lists schedules, not scheduled events. A schedule is just a name and an interval, and it says nothing about what is queued to run. For the actual events, use wp cron event list. Also, WP-CLI loads the site’s plugins like any other request, so a plugin that is deactivated will not show its schedule.

Further reading: WP-CLI: wp cron schedule list

More WordPress tips wp user application-password create anna backup-script --porcelain define( 'MEDIA_TRASH', true ); wp cli check-update wp theme delete --all wp media image-size All WordPress tips (85) All topics

Link