Using the win2008 task scheduling function

Source: Internet
Author: User

1. Regular backup of important data

With the gradual advancement of Informatization and the popularization of information technology, the dependence degree of each unit on LAN network is more and more high, and the data information stored in LAN server is more and more important. In order to prevent accidental occurrence, cause important data loss, more and more units began to pay attention to the security of data information, and the most common way to protect data security is to do the data backup work in time, so the Windows Server 2008 system specially strengthens the data backup function, Cleverly use the system environment backup function, we can enjoy the professional level of data protection wonderful! However, backing up important data is a cumbersome operation, and many times users forget to perform regular backup operations for some reason. So how do you automate regular backups of important data? In fact, in the Windows Server 2008 system environment, we can skillfully use the enhanced Task Scheduler to achieve the important data scheduled backup function, the following is the specific implementation steps:

First, open the Windows Server 2008 system's Start menu, select Programs/attachments/System Tools/Task Scheduler commands, and then enter the Task Scheduler window of the Windows Server 2008 system, and click in the list area on the left. Task Scheduler Library option, click the new Folder option in the action list in the right list area of the option that you want, and then, when prompted, set the name of the new folder to smart Backup, and then click OK to return;

Next, expand the Task Scheduler Library option in the left list area with the mouse, and select the Smart Backup subkey below this option, click the Create task item in the right list area for the subkey, open the Create Task Settings dialog box, click the General tab in the dialog box, and on the corresponding label page, name Enter the name of the target task in the text box, such as "Smart Backup," where the remaining parameters in the label page can be set by default;

Then click the Triggers tab, and then click the New button in the tab Settings page that pops up. Open the New Trigger dialog box as shown in Figure 1, select the Plan when option in the Start task of the dialog box, and adjust the frequency parameter for the task to "daily", and the default state windows The Server 2008 system starts at the moment that the task plan was created, and we might try to set a specific start time for the scheduled execution of the task based on actual work requirements, such as we can set the start time to "2008/8/8 20:00:00" (The moment of the opening of the Beijing Olympics); Click the OK button in the New Trigger dialog box to return to the Create task settings interface;

Then click the Actions tab, click the New button in the corresponding tab settings page, click the Drop-down button in the dialog box that pops up, select the Start Program option from the Drop-down list, and then click the Browse button to open the File selection dialog box. Select and import the script files that we created before to back up important data, and then click OK, so we can easily implement smart backup operations on important data.

Tip: With a Windows Server 2008 System Task Scheduler, we can fully back up the Windows Server 2008 system to a network share. When doing this backup, we need to first create an operational task that is backed up to a network share through the Windows Server Backup feature that comes with the Windows Server 2008 system, and then follow the previous procedure to open Windows Server 2008 System Task Scheduler window, click the Create Basic Tasks option in the list area on the right, and then follow the wizard window's prompts to set the new task name, start time, start date, and then select the Startup Programs option in the interface shown in Figure 2, and in the program or script box, enter the detailed path "X:windowssystem32wbadmin.exe" for the Wbadmin.exe command (where X is the disk partition symbol for the Windows system), and then click Finish to exit the Task Scheduler Settings window, so that Windows The Server 2008 system will be intelligently backed up to a network share at a specified time later.

  2. Flexible system shutdown operation

Every day after work, we often need to select the "Start"/"Shutdown"/"shutdown" option, in order to shut down the computer system, it is obviously a little cumbersome to shut down the computer system! Now we can leverage the Windows Server 2008 System's Task Scheduler to enable flexible system shutdown operations ! Some friends may say that this shutdown is simply too simple to open the Windows Server 2008 System's Task Scheduler window, create a new task, and have the task execute the string command "Shutdown.exe-s" at a specified time, a specified date, will be able to implement intelligent shutdown computer system operation. However, if you have a special case on which day, the Windows Server 2008 system starts shutting down the system and suddenly we remember that there is something to be done when you want to prevent the system from performing a shutdown operation by executing the string command "Shutdown.exe-a" That might be a bit too late; now, with the help of the Windows Server 2008 System's Task Scheduler, and by creating the right scripting program, we can achieve a flexible shutdown purpose:

First run the Notepad program, and in the pop-up Text editing window, enter the following command-line code:

@echo off

Shutdown-s-T 60

echo presses any key to exit the system shutdown operation ...

Echo ...

Pause

Shutdown-a

Where the "shutdown-s-t-60" command code indicates that the system will be automatically shut down within 1 minutes, and that we can set it flexibly according to the actual work, and the "shutdown-a" command code means to force the system to perform a shutdown operation. However, the operation requires that we press any key on the keyboard to be automatically executed; After confirming that the command line code is correct, click the file/Save command in the text editing window, and then save the above code as a "Shutdown.bat" file in the Pop-up File Save dialog box;

Second, open the Windows Server 2008 system's Start menu, click Programs/attachments/System Tools/Task Scheduler commands, and then go to the Task Scheduler window of the Windows Server 2008 system, clicking in the list area on the left. Task Scheduler Library option, click the Create Basic Task option on the right list area of the option that you want to select, when you enter the Task Plan Creation wizard window, when the wizard interface prompts us for what we want the task to do, we can select the Launcher option in the interface shown in Figure 3, and then click the Next button. Then click the Browse button to select and add the previously created "Shutdown.bat" batch file;

Then set the frequency of the task to "daily", set the start time to the time you want to work, and finally click OK to finish creating the system shutdown task. In the future, once the work time is over, the Windows Server 2008 system will be able to automatically run the "Shutdown.bat" file, perform system shutdown operation, if in the process of shutting down the system, we suddenly think that there are some work to be handled, You can press any key in the keyboard to cancel the system shutdown operation, so we realize the purpose of flexible and changeable shutdown computer system.

 3. Sharing uses the same scheduled task

In the local area network work environment, many ordinary workstations all need to carry on the same plan task, if separately in each workstation to create the plan task sequentially, obviously is not advantageous to enhances the local area network user the work efficiency! In order to effectively improve productivity, we can export most LAN users to perform the scheduled tasks, It is then published to the LAN server or to a specific shared folder so that other local area network users share the usage. For example, performing a data backup operation might be the work of every workstation, as long as we publish the previously created Smart backup task to the local area network, other users will be able to share the scheduled tasks that use this data backup without having to repeatedly create the data Backup Schedule task on their own workstations. Now, let's take a look at how you can share the same scheduled tasks with your friends in the previous smart backup scheduling task:

First, open the Windows Server 2008 system's Start menu, click Programs/attachments/System Tools/Task Scheduler commands to enter the Task Scheduler window of the Windows Server 2008 system. In the left list area of the window, click the Task Scheduler library/Smart Backup node option in turn;

Then use the mouse to select the specific task plan name below the node. For example, the smart Backup scheduled task, with the right mouse click on the scheduled task name, from the pop-up shortcut menu, click Export, as shown in Figure 4, to save the smart Backup scheduled task export as the Smart Backup. xml file; The smart Backup. xml file is uploaded to the LAN server or to a shared publication in a specific shared folder. When a workstation that requires the same backup operation performs a backup task, you can download the smart Backup. xml file directly to the local workstation system, open the Scheduled Tasks window, click the Action option in the list area on the right, and then select the Import Tasks command to download the "Smart Backup. Xml" The File import task file is OK.

Of course, it is important to remind friends that in order to ensure that the scheduled tasks we specify are automatically run, we must carefully check that the system service Task Scheduler is working properly, and once the system service is not working properly, we must immediately restart the service successfully. Also ensure that the startup type of the system service is set to Automatic. In addition, when sharing the same scheduled tasks, we often need to fine-tune the downloaded scheduled task parameters, such as the user account running the scheduled task needs to adjust the cost of the workstation's system login account, the scheduled task time to meet their actual work needs.

Small tip: When you execute a shared scheduler on a different workstation, you often experience a failure that the scheduled task fails to perform successfully, the most important reason for this is that the Task Scheduler operation requires that the specified application be invoked, and that the specified application may not be stored in the same location on a different workstation. That way, a task plan may not be able to invoke the desired application from the specified location, causing the scheduled task to fail to execute successfully. To resolve the symptom caused by this factor, we simply need to modify the appropriate application path information.

  4, automatic acquisition of the implementation of the Plan task

Although we have detailed planning tasks, but most of the time the system does not follow the requirements of the implementation of the Plan task, which is obviously we can not tolerate, there is no way to know whether the target planning task has been successfully run? In fact, just take advantage of Windows Server 2008 the newly added Event Viewer task Plan additional functionality, we will be able to know in time the target task plan implementation. To achieve this, we can follow the steps below:

First, open the Windows Server 2008 system's Start menu, select the Run command, enter the string command "Eventvwr.msc" in the pop-up system run text box, and click the OK button to enter the System Event Viewer window;

Second, on the left display area of the window, position the mouse over the Event Viewer (local)/Application and service Log/Microsoft/Windows/TaskScheduler/operational options. This procedure may display multiple past times, from which you can find an event record for which an error alert occurred, and right-click the logging option to perform the attach task to this event command from the pop-up shortcut menu;

In the Create Basic Task Wizard Setup interface that appears later, after you are prompted to set the name of the target task and the description information, open the Action Settings dialog box, select the Show Messages option in the dialog box, and then set the contents of the Message alert box, such as the "caption" Name of the Message alert window. Scheduled tasks did not execute on schedule ", set the content to be displayed in the message box to" the system encountered an unexpected causes the scheduled task to not be executed on schedule, check for reasons ", and then click the Finish button to return to the Event Viewer task of the scheduled task program, at which point we can see the previously added task schedule. In the future, if the target task plan is not successfully executed, the system will automatically pop up the alert message to notify us.

In the Windows system there are many features that are ignored by users, if you can make good use of our operations will have some help, like the task planning function, the user skillfully use the Task Scheduler to arrange their own task plan, not only improve the system operating efficiency, but also modified their own work efficiency.

        Note : more Wonderful tutorials please focus on the Triple computer Tutorials section, triple Computer office group: 189034526 Welcome to join

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.