I'm working with the jQuery Countdown timer for the first time and I wanted to integrate it into my WordPress site to display the time until the next scheduled cron event. When the countdown has reached 0, it grabs the next timestamp and begins counting down to that, and so on...
What I have so far
jQuery
/*
* Initialize the schedule countdown
*/
var nextScheduledEvent = new Date( <?php echo wp_next_scheduled( 'execute_cron_events' ); ?> );
$('#countdown-table').countdown({
until: nextScheduledEvent
});
This does not output anything, probably because the timestamp format is wrong.
I'm not really sure how to go about this, or if I am even on the right track.
Does anyone have ideas suggestions that might help out, or make this easier?
Thanks.