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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:51:05+00:00 2026-06-13T17:51:05+00:00

I have a .bat file in a Windows machine that starts our program by

  • 0

I have a .bat file in a Windows machine that starts our program by calling a main class of a Java executable(.Jar)

Now I need to run this every 30 mins.

I gone through several ways of doing it, but unable to decide which is better.

Scheduling through Windows scheduler or Using Java Timer. Which one to choose?
I want only one instance of the process running. If the previous process doesnt complete within 30min, i could wait.

Please let me know what to go for, based on my use case.

Thanks in advance.

  • 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-06-13T17:51:07+00:00Added an answer on June 13, 2026 at 5:51 pm

    You’re better off using the Windows Scheduler. If there’s a real risk of the process taking too long, you can create a file, or open a socket while the process is running and when another one tries to start up, it can detect that and simply quit. This would make it “miss” the 30m window (i.e. if the first job started at 12 and finished at 12:35, the next job would not start until 1).

    But this way you don’t have to worry at all about setting up long running processes, starting and stopping the java service, etc. The Windows scheduler just makes everything easier for something like this.

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

Sidebar

Related Questions

I have made a batch file that call another one program.bat , the first
I'm using Sliksvn Windows client and have a DOS BAT file that contains the
I have a Windows BAT file that looks like this: Z: tool.exe c:\mypath\to\input c:\mypath\to\output
I have bat-file, that make some operations. How to run this file from Delphi
I have a bat file that I want to run at specific day/time in
I have a .bat file to be executed. Inside that .bat file, at its
I have a .bat file that publishes my VS2010 application, then copies the files
I have a PHP script that executes a .bat file using system(cmd /c C:\dir\file.bat);
I have a complicated batch file (under windows), let's call it BigMess.bat. It makes
I have a Window .bat file with DOS commands that involve REM, MKDIR, ECHO,

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.