Windows Server 2008 Executes a bat file periodically by scheduling a task

Source: Internet
Author: User
The previous time in Windows Server 2008 installed a MySQL database based software, in the data security considerations, I hope that every day to automate the database backup. I wrote a bat script for a database backup on the basis of someone else's script, and when I double-click the script, I would normally back up the database as a bak file, so I wanted to put this bat on the Windows Server 2008 scheduled task and automatically execute the script 0:00:00 every day.

But in the course of the experiment, each change script on the first day of normal operation, the next day to find the plan task error. It's been a couple of weeks, and it's only one run at a time. Today, I saw an article on the Internet about scheduling tasks that failed to execute the bat batch file under Windows Server 2008, and finally backed up two files every 5 minutes in accordance with the method it presented. Compare settings before and after two (previous scheduled task settings were created using the "Create Basic Tasks Wizard" in a scheduled task. This time using create tasks, the main difference is the security options on the Scheduled Tasks General tab and the starting (optional) option in the new operation.

Here it focuses on the second type of success. Create a task”。 First, open the Windows Server 2008 system's Start menu, and select Programs/attachments/System Tools/Task Scheduler commands in turn.







Click "Create task" as shown: fill in the appropriate name and check the necessary conditions


Select "Trigger" option, click "New", create task Execution time, "Repeat task interval" after this choice, there is time to choose, is hourly, or every point, you can choose to modify the time, and then determine.



To configure the actions that need to be performed, is to choose the written program or BAT file, here is a very important configuration is the selection of bat file, in the "Start (optional)" Here must fill in the corresponding execution program or the directory of the bat file, or the implementation of unsuccessful.





Excerpt original post address: http://stevenz.blog.hexun.com/82057293_d.html

More detailed Introduction: http://www.knowsky.com/440205.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.