Skip to content

Instantly share code, notes, and snippets.

@ianmjones ianmjones/runNow.js
Last active Apr 8, 2016

What would you like to do?
Simple runNow() function for wp-cron-pixie
runNow: function() {
// Only bother to run update if not due before next refresh.
var seconds_due = this.model.get( 'seconds_due' );
if ( seconds_due > CronPixie.timer_period ) {
var timestamp = this.model.get( 'timestamp' ) - seconds_due;
{ timestamp: timestamp, seconds_due: 0 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.