Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

170
Views
Calling method continuously every 10 minutes in Typescript, Ionic2

Is this possible to trigger a method every 10 minutes in typescript/angular2?

And second question, is this possible to call a method everytime local time reaches multiply of 10 minutes? Like:

5:00 then 5:10 then 5:20 then 5:30 then 5:40...
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can do that using Reactive-Extensions/RxJS.

Rx.Observable.timer(dueTime, [period], [scheduler])

Returns an observable sequence that produces a value after dueTime has elapsed and then after each period.

This is just an example from the doc.Hope you can use it easily with your use case.

var source = Rx.Observable.timer(200, 100)
    .timeInterval()
    .pluck('interval')
    .take(3);

var subscription = source.subscribe(
    function (x) {
        console.log('Next: ' + x);
    },
    function (err) {
        console.log('Error: ' + err);
    },
    function () {
        console.log('Completed');
    });

// => Next: 200
// => Next: 100
// => Next: 100
// => Completed
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!