Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

segan93 on "wp_next_scheduled() with jQuery Countdown"

$
0
0

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.


Viewing all articles
Browse latest Browse all 8245

Trending Articles