Hello, anyone knows how to implement this “npm install --save node-schedule” into typescript? As most of the websites are about javascript,Node-schedule
// importing the node-schedule on your page.ts
import * as NodeSchedule from ‘node-schedule’;
/// inside the constructor
var j = NodeSchedule.scheduleJob(’* * * * * *’, () => {
///do something
});
mostly the same for using other nodejs plugins on ionic
Does that really work? I would be rather surprised. That library doesn’t look like it’s intended to run in a browser environment at all.
well, it worked for me.
1 Like
Thanks for responding. I still think that if I were looking to schedule tasks in an Ionic app, I would be inclined to use the RxJS timer function instead of adding another dependency.