I want to create an app that daily notifies me a value on a web page, I found this answer. It says that JobScheduler will do the trick for the daily part but I am not sure if it is going to run when the app is closed.
By the way I found that if I want to run a job every 3 seconds the code will be the following:
JobInfo.Builder builder = new JobInfo.Builder(1,
new ComponentName(getPackageName(),
JobSchedulerService.class.getName()));
builder.setPeriodic(3000);
If it is daily, should the time be:
builder.setPeriodic(86400000);
Or is there any way to Schedule at a exact time e.g. 9:00 a.m.