Ionic - App-wide countdown timer

I am creating an app which should have an internal clock of about 12 hours. Once the clock reaches 0 a button will become enabled in the bottom menu bar. I would also like to display this clock as it is counting down.

I am not sure how I can implement this. I would have to run some kind of background task that keeps checking to see if 12 hours is over, probably using the Date object’s getTime() function. What I’m stuck on is I don’t know how to run this task in the background. How do I run an asynchronous task throughout the whole app?