Hello, I am having a problem getting all the users on the server side I come across this error throw new Error (“Meteor code must always run within a Fiber.” +
, how to write this request simply?
import { Meteor } from "meteor/meteor";
import { Balances } from "../../imports/api/balances/balances";
const _ = require("lodash");
import moment from "moment";
import Binance from "binance-api-node";
var CronJob = require("cron").CronJob;
export const generateBalancesUsers = new CronJob(
"0 0 * * *",
function() {
console.log("START CRON");
Meteor.users.find().forEach(function(user) {
console.log("user", user);
});
},
null,
true,
"Europe/Paris"
);