How can we store node-schedule in firebase

35 views Asked by At

We are creating application similar to an alarm and we are scheduling job using node-schedule. We want to store this job reference to the firebase. But when I am trying to store this job reference in an object but we are getting an error.

Error: set failed: value argument path specified exceeds the maximum depth that can be written (32) or object contains a cycle in property.....

We cannot use firebase scheduler due to some constrains but is there any way if we cannot store in firebase then we can store it in local filesystem or store it in firebase.

The job that we are scheduling using node-schedule:

const job = schedule.scheduleJob(rule, () => {
    console.log("Our scheduler function......")
});

Then we are adding it to our scheduler object:

schedulerData.schedulerFn = job;

Then we are trying to push the schedulerData

schedulerRef.set(schedulerData)

PS: There was a similar question but it does not answer how we can store the job data and how can we retrieve it. Regards.

0

There are 0 answers