Skip to content

Instantly share code, notes, and snippets.

@iamkevingreen
Last active October 27, 2016 00:53
Show Gist options
  • Save iamkevingreen/1f5d08419c83dcd8b71abb0ff9637b85 to your computer and use it in GitHub Desktop.
Save iamkevingreen/1f5d08419c83dcd8b71abb0ff9637b85 to your computer and use it in GitHub Desktop.
import { Meteor } from 'meteor/meteor'
Meteor.startup(() => {
Meteor.call('getCMSContent')
SyncedCron.add({
name: 'Scrape WordPress API',
schedule: function(parser) {
// parser is a later.parse object
return parser.text('every 1 hours')
},
job: function() {
Meteor.call('getCMSContent')
}
})
})
SyncedCron.start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment