Home » Android » Schedule a Job at specific time of the day

Schedule a Job at specific time of the day

Posted by: admin November 1, 2017 Leave a comment



I am using AlarmManager and JobScheduler(=> API 21) to generate Notification at 11 am in the morning.


Suppose my device is turned off at 11 am. So Alarm will not go off and Notification is not generated for today. Now, when it will reboot. the alarm is set again for 11 am of next day using BroadCastReceiver on action.BOOT_COMPLETED.

I have explored Job Scheduler a bit and setPeriodic(ms) function is used to set a periodic job but does not allow to schedule a job at specific time.
(Google -> define schedule -> arrange or plan (an event) to take place at a particular time.).

Any pointer to workarounds to this use case. I would prefer native solution, though.