I have successfully set up my function to run every minute or second, but I am unsure how to schedule it to run in hours and days. My goal is to have the function called daily within my application.
Below is the code I am using to call the function every 10 seconds:
this.sub = Observable.interval(10000)
.subscribe( next: (val) => {
console.log('called');
// call my function
},
error: err => {
console.log(err);
});