File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes General Computing and the fly likes Windows scheduler not actively backing up MySQL dump Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Windows scheduler not actively backing up MySQL dump" Watch "Windows scheduler not actively backing up MySQL dump" New topic

Windows scheduler not actively backing up MySQL dump

Ahsan Bagwan
Ranch Hand

Joined: Oct 05, 2010
Posts: 157
My primary environment is Windows where I'm making use of Scheduled Tasks for automating the running of my batch file. I've set the scheduler to spit the dump file each day at 06:30 PM.

However, I've discovered recently that it has stopped running the scheduled tasks. It did run for a few days for that matter. The content of my .bat is as follows:

mysqldump -h localhost -u root -p***** -R schemaname > "D:\mysqldumpbackup.sql"

Has anyone faced a similiar problem? Am I missing something trivial?
Martin Vajsar

Joined: Aug 22, 2010
Posts: 3606

The scheduler should list the date a task was run for the last time. Is this date for your task several days old? If it is, the problem is with scheduler itself, at this point I'd try to review the properties of the task and perhaps also Windows Event log to see whether anything is amiss.

If the scheduler seems to be running your task, the problem might lie in the BAT file itself. Try to run the BAT file from the console. If it doesn't work, you'll obviously have to fix your BAT file. If it does work, try to run the scheduled task manually from the Task Scheduler (Run command on the context menu). If the BAT File doesn't work when run from the scheduler, my bet would be that it runs in a different security context and it's causing problems. You might want to change the user account under which the Scheduler runs the task in the Properties options - for example, set it to your own user account.
Ahsan Bagwan
Ranch Hand

Joined: Oct 05, 2010
Posts: 157
Turns out the password in the dialog that appears on clicking Properties in context menu is to be changed if and when you change the system password.
Peter Johnson

Joined: May 14, 2008
Posts: 5812

The "password has changed" issue bites me every 90 days... :-)

JBoss In Action
Paul Clapham

Joined: Oct 14, 2005
Posts: 18541

What's more fun is when you have automated systems connecting to the application. When its password changes the first thing that happens is that they can't connect, and within seconds after that they have retried 10 times and the application's user ID has been frozen by the security system.
I agree. Here's the link:
subject: Windows scheduler not actively backing up MySQL dump
Similar Threads
Chron jobs?
suggestion ways of setting up a cron on windows plateform
moving your tables+content to another MySql server
make my computer be an alarm
Writing batch files!