In my application, I want to store an object for later execution of functions basically that object holds the data of cron job.
var cronJobObject = schedule.scheduleJob(new Date(2018, 0, 19, 15, 15, 0), function() {
console.log("Cron started here");
});
And I am storing that object in mongodb like JSON.stringify(cronJobObject)
And retrieve with cronObj = JSON.parse(obj)
but when I call a function on that object I get function undefined error
I think my problem is similar to this node.js store objects in redis
But the solution didn't help me