How to increment value in database every second
<p>I have objects in a mongodb database that have:</p>

<ol>
<li>Max Population.</li>
<li>Population Increment (How much population should increase by every second).</li>
<li>Current Population.</li>
</ol>

<p>Users will be changing the population through different methods, but I want to have some code on the server that is incrementing the object's current population by the object's population increment every second until the max population is reached.</p>

<p>Any idea on how I could implement this? I think I need a meteor interval with a $inc query, but I have no idea in which file I should put this and how I will access the object's max population and increment values inside the query.</p>