Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3233944
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:20:06+00:00 2026-05-17T17:20:06+00:00

If I want to schedule at recurring task that is aligned with a specific

  • 0

If I want to schedule at recurring task that is aligned with a specific date it would make sense to use ScheduledExecutorService. But it has no method to pass in the firstRunDate + subsequent delay to a scheduleAtFixedRate method. I know I can back out the initial delay myself but is there any reason this isn’t provided by the API? Especially as internally the SES is implemented using triggerTimes (which is what I want to pass in).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:20:07+00:00Added an answer on May 17, 2026 at 5:20 pm

    Based on the documentation:

    All schedule methods accept relative delays and periods as arguments, not absolute times or dates. It is a simple matter to transform an absolute time represented as a Date to the required form. For example, to schedule at a certain future date, you can use: schedule(task, date.getTime() – System.currentTimeMillis(), TimeUnit.MILLISECONDS). Beware however that expiration of a relative delay need not coincide with the current Date at which the task is enabled due to network time synchronization protocols, clock drift, or other factors.

    It looks as if it was a deseign decision. Its widely known that the Date class has its problems. For example TimeTask’s public void scheduleAtFixedRate(TimerTask task, Date firstTime, long period)
    does not account for day light savings time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to schedule job that would run immediately once the server is up,
Ideally you want a schedule that's accommodating and flexible but when it comes to
I want to schedule my jasper report so that at a particular time, it
I want to run a sql query on a specific schedule (weekly) and need
I want to schedule a task in emacs org-mode to show up multiple times
I want to schedule a task on Linux by icrontab, and the task is
Lets say I want to schedule task a,b,c,d for cron to run a,b,c,d and
I need to write a tool that will run a recurring task on a
I'm trying to use a flexlib schedule viewer in my application. I want to
I have some task which I want to schedule and I did not work

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.