How can I run a job at a specific time once a day every week?
See original GitHub issueHello, I’m interesting in a periodic job (once a week for example) that is fired at a specific time (for example at 4.00 PM) I have read from this post
that I can run a job every day once a day, but it is not my case. If I set
new JobRequest.Builder( MY_TAG )`
.setExact( TimeUnit.HOURS.toMillis( 16 ) + TimeUnit.MINUTES.toMillis( 0 ))
.setPeriodic( TimeUnit.DAYS.toMillis( 7 ), TimeUnit.MINUTES.toMillis(5) )
.setPersisted(true)
.build()
.schedule();
I have this error “Can’t call setExact() on a periodic job”
Can someone help me?
Issue Analytics
- State:
- Created 6 years ago
- Comments:14
Top Results From Across the Web
How to run a job on specific times every day from Monday to ...
One way is to create four jobs scheduled at a single time every Mon-Fri. Give each a single step, which is a job...
Read more >Scheduling Jobs to Run at a Specific Time - IBM
The Submit Job (SBMJOB) command is an easy way to schedule a job that needs to run only once. It also enables the...
Read more >5 Daily Scheduling Methods to Bring More Focus to Your Day
For example, you could schedule your most challenging tasks for the first two hours of the day and plow through your inbox during...
Read more >How to run a cron job on specific days of the week
How to run a cron job on specific days of the week · 1. Edit the crontab for the user wishes to create...
Read more >How to schedule a process to run in a specific time daily
Execution Target tab, select the Robot(s ) that you want to execute the process. · Specific Robots , all the Robots associated to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I really don’t want to answer that here. That’s an issue tracker where people can report defects in the library. I suggest that you take a look at this sample and if that doesn’t help, then ask this question at an appropriate place like Stackoverflow.
@hoangtrungnguyen Yeah I have solved my problem. I am using
WorkManager
now. I created aPeriodicWorkRequest
and enqueued it as Unique Work so I only have one work running with a unique id. It periodically checks data from local database and fire the task withAlarmManager
at an exact time.