Make WordPress Core

Opened 3 years ago

Last modified 2 months ago

#18471 new enhancement

Add action hook after cron processed it's jobs

Reported by: tott Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.2.1
Component: Cron API Keywords: has-patch
Focuses: Cc:


Sometimes it's hard to debug cron jobs or validate the results. A simple action fired after the wp-cron.php did his magic could help improve this experience.

Attachments (2)

wp-cron-action-hook.diff (230 bytes) - added by tott 3 years ago.
Add action hook to wp-cron.php
22143.diff (455 bytes) - added by batmoo 18 months ago.

Download all attachments as: .zip

Change History (8)

tott3 years ago

Add action hook to wp-cron.php

comment:1 danielbachhuber3 years ago

  • Cc wordpress@… added

comment:2 nacin19 months ago

#22143 was marked as a duplicate.

comment:3 toscho19 months ago

  • Cc info@… added

comment:4 scribu19 months ago

  • Keywords has-patch added

I guess using the 'shutdown' hook wouldn't do, since you would want access to the jobs just completed.

How about calling the hook 'did_cron' instead?

Last edited 19 months ago by scribu (previous) (diff)

batmoo18 months ago

comment:5 batmoo18 months ago

Added patch from #22143; it fires the action immediately after the event has executed and passes in some args specific to that event.

comment:6 ircbot2 months ago

This ticket was mentioned in IRC in #wordpress-dev by danielbachhuber. View the logs.

Note: See TracTickets for help on using tickets.