How do you use timerpicker for firebase to start/stop specific task?

I am using two timepicker for start and stop specific task, and my backend is fiebase. How do I do it even if the app is closed.