WP Crontrol should log all cron events for debugging purposes and expose the log somewhere. This can be achieved by iterating distinct cron hooks in the cron array and adding an action which logs the event. Data to log includes: * [x] Hook name * [x] Timestamp * [x] Parameters * [x] Callbacks registered at the time the event ran * [ ] ~~Whether it was run manually (via `Run Now`) or via the regular scheduling~~ * [x] Time taken to run (via an early action and a late action with timing) * [ ] ~~Did the event miss its scheduled time? By how much?~~ * [x] Catch fatals? Probably needs PHP 7. Re-throw them. * [ ] PHP errors * [x] Queries performed * [x] HTTP API calls performed * [x] Memory used Plus: * [ ] Ability to call `do_action( 'crontrol_something' )` to log extra data in the event log * [ ] Ability to throw an exception to cause an event to "fail", similar to Action Scheduler * [ ] Limit on the number of logs stored. Either a number or a time frame * [x] Should be optional, ie. can be turned off * [x] Ability to disable event logging by hook name, maybe a filter or maybe a UI control * [x] Cron events by default logged in a post type, post meta, terms * [ ] Storage should be abstracted so it can be stored elsewhere, eg Stream, Simple History, custom table, system logger Stretch Goals: * [ ] Extended support for Action Scheduler, list which jobs were triggered
WP Crontrol should log all cron events for debugging purposes and expose the log somewhere.
This can be achieved by iterating distinct cron hooks in the cron array and adding an action which logs the event. Data to log includes:
Whether it was run manually (viaRun Now) or via the regular schedulingDid the event miss its scheduled time? By how much?Plus:
do_action( 'crontrol_something' )to log extra data in the event logStretch Goals: