Meteor setInterval on server side -


what have do, use meteor.setinterval on server side? when use it, it's work, get:

exception in setinterval callback: error: method not found [404]  i20150429-15:47:50.897(2)?  @ [object object]._.extend.apply (packages/ddp/livedata_server.js:1502:1)  i20150429-15:47:50.897(2)?    @ [object object]._.extend.call  (packages/ddp/livedata_server.js:1472:1)  i20150429-15:47:50.897(2)?     @ app/server/cronjob.js:35:43  i20150429-15:47:50.897(2)?      @ [object object]._.extend.withvalue (packages/meteor/dynamics_nodejs.js:56:1)  i20150429-15:47:50.897(2)?   @ packages/meteor/timers.js:6:1  i20150429-15:47:50.898(2)? @ runwithenvironment (packages/meteor/dynamics_nodejs.js:108:1) 

i error try this:

meteor.setinterval(function(){ console.log("test"); }); 

why happens?

you need specify delay interval, e.g., 5 seconds:

meteor.setinterval(function(){   console.log("test"); }, 5000); 

it's hard know behavior without specified time interval.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -