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

  • Home
  • SEARCH
  • 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 7496249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T18:32:42+00:00 2026-05-29T18:32:42+00:00

i have a batch(backup.bat)file.in that i have written a command to create a backup

  • 0

i have a batch(backup.bat)file.in that i have written a command to create a backup of database
which is

<
set path=%path%;C:\Program files\MySQL\MySQL Server 5.1\bin;
mysqldump -u `root` -padmin -B jewellery > backup\jewellery.sql
exit
>

i have created a controller to call this batch file.
that is given below

<
public class JobScheduleController extends QuartzJobBean {
      protected void executeInternal(JobExecutionContext ctx) throws JobExecutionException {
          // check FTP
          try {
                Runtime rt = Runtime.getRuntime();
                rt.exec("cmd.exe /c start Backup.bat");
.....
.....
......
catch(Exception ex){
                ex.printStackTrace();
                }
      }
}
>

even i have given the mapping in bean.xml that is given below

!– Start Job Schedule for Application Backup Controllers–>

<bean name="jobScheduleController" class="org.springframework.scheduling.quartz.JobDetailBean">
  <property name="jobClass" value="com.jewellery.web.JobScheduleController" />
</bean>

<bean id="cronjobScheduleController" class="org.springframework.scheduling.quartz.CronTriggerBean">
    <property name="jobDetail" ref="jobScheduleController" />
    <!-- run at 11 am (0  0  11  ?  *  *") (Seconds,Minutes,Hours,Day-of-Month,Month,Day-of-Week) -->
    <property name="cronExpression" value="0 0 11 ? * *" />
</bean>

<bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
    <property name="triggers">
        <list>
            <ref bean="cronjobScheduleController" />
            </list> 
    </property>
</bean>

the problem is as per the given time the controller shuld search and invoke the batch file to execute.but it says the batch file not found.

where shuld i place the batch file .

the same code was running succussfully in spring 2.0,nw i have migrated to spring 3.
where shuld i place my batch file.?

i am using eclipse indigo…?and one more thing is this the best way to do it or some other way is also there..if there kindly let me knw.

  • 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-29T18:32:43+00:00Added an answer on May 29, 2026 at 6:32 pm

    Just set Backup.bat in your environment path variable

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

Sidebar

Related Questions

I have following batch file code: @echo off SET INSTALL_PATH=c:\program files\ :ask_again if exist
I have a batch file that executes a .sql file to backup a database.
I have a batch file that was created for an Oracle database that I'm
I have several batch files that I call from a parent batch file. I
I have a batch-file program that gets called from another batch-file so I can
I have a batch file which initializes variables via SET inside a for loop,
I have a batch file to help clients do automated backup of their files,
I have a batch file that outputs a list of commands which themselves can
I have a batch file (in windows XP, with command extension activated) with the
I have a batch file that installs WinVNC in about 1 second and starts

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.