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 6668821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:04:56+00:00 2026-05-26T03:04:56+00:00

I am writing a scheduler which grabs XML data and inserts into MySQL DB

  • 0

I am writing a scheduler which grabs XML data and inserts into MySQL DB – simple isn’t. But the problem or the logic that I am trying to find is here. NOTE: I want to execute this in windows environment in future it might be configured for other platforms.

  1. Scheduler should run on every 5 mins.
  2. This script should fetch condition/configuration on what to parse and collect the data-fields from XML and these conditions are available from MySQL table.
  3. This table also defines a delay in which this script should check for the difference in the XML fields & delay.
  4. This script does both, one is running for every 5 mins to collect XML and check the difference in the table (MySQL) for every said delay.
  5. This script then reads the XML data-fields and parses it, then collects only those data-fields that is defined from the above MySQL table.
  6. The collected data will be inserted into MySQL DB only when there is change in the state and this state is defined from MySQL table.

Feedback/Suggestions:

  1. Due to the delay, I am not sure how should I store the configuration in the script which will be shared between each schedules.
  2. Is there anyway to use static variable in the code to store this data? Which will be shared b/w different jobs? or different schedules?
  3. Basically, how should I implement this? A better approach in terms of performance.

Thanks for your time.

UPDATE:

One of the suggestion is to use Java Code as a windows service (?) we could have some common data shared between different jobs? – does it make sense?

Reference:
Java Service Wrapper

  • 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-26T03:04:56+00:00Added an answer on May 26, 2026 at 3:04 am

    Concurensy is the answer, try creating Thread pool or Executor servises, and stop certain threads for 5min , you coud even use Synchronization if few threads will be working with the same resource.
    Remember not always the more threads use the faster you will finish your job f.e. 3 threads- 2 min
    5threads-6 min

    *Read tutorial about threads

    *create fe simple threads with wait for 5 min

    *read some tutorials about thread pool/synchnizations and sharing resourses (script part)
    *test to find the most optimal way

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

Sidebar

Related Questions

I'm writing a JavaSCript class that has a method that recursively calls itself. Scheduler.prototype.updateTimer
I'm currently working on a cross-platform task scheduler, but I'm having a problem with
I'm writing a web application which contains a kind of schedule. After a certain
I'm writing a scheduler or sorts. It's basically a table with a list of
I am writing an app that allows people to schedule things for certain times
I'm writing an application that runs things to a schedule. Idea being that the
Writing a JSP page, what exactly does the <c:out> do? I've noticed that the
I'm writing a latency sensitive app that in effect wants to wait on multiple
I am writing a scheduled task which I would like to run frequently. The
I am writing a Maintenance Script for MongoDB that will compact collections from a

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.