I would need to know how much time is left between now and the next time a specifc Cron Job is done.
For another answer I built a basic cron inspector plugin which can be found here.
Reason I’m asking is that I’m already that wasted from working that I can’t think straight at the moment. :/
Thanks in advance.
Edit:
wp_next_scheduled()
returns the timestamp of the next scheduled job of a specified wp-cron job-arguments pair.Please note that this differs slightly in functionality to the answer below, in that you have to provide the arguments passed to cron job’s callback (if it has any). The original answer would provide the time of the next specified job regardless of the arguments it would run with.
The cron array (
_get_cron_array()
) returns an array of cron jobs indexed by timestamp (each timestamp will have an array of crons associated with it – i.e. those jobs which shall be triggered).