Dig deep into Vista's "scheduled task"

Source: Internet
Author: User

"Scheduled task" is a service provided by Vista, and its functions are greatly enhanced based on XP. Due to the user's prejudice, it is considered to be simply a "chicken" feature of Vista, and the use of third-party software with more powerful features is abandoned. Based on the author's experience, as long as in-depth mining and flexible application can fully meet our planning needs. Next we will dig deep into the Vista program task function to make "chicken ribs" a big meal.

  I. Automatic Data Backup for "scheduled tasks"

Data is priceless, and timely backup of data is the most reliable measure for data preservation. However, data backup is a repetitive task, and sometimes the backup is forgotten for some reason. How can we make data backup more intelligent? without third-party software, we can easily implement the flexible application of Vista's scheduled tasks.

Step 1: Click Start → all programs → attachments → System Tools → scheduler jobs → open the scheduler window, and select the "scheduler library" on the left ", click "new folder" in "operation" on the right, enter the new folder name "data backup" as prompted, and click "OK ". (Figure 1)

Figure 1 scheduled task data backup

Step 2: select the created folder and click "Create task" on the right to open the wizard. Enter the task name after "name", for example, "data backup", click the "Trigger" tab, and click "new ", in the "Start task" dialog box, select "plan creation ". The task frequency is set to "Daily". By default, the system starts from the current day. We can set the "Start time" as needed, for example, 16:00:00 on January 1, 2008/715 (one hour before work ). Finally, click OK to return to the task creation wizard window. (Figure 2)

Figure 2 create a task

Step 3: click "new" under the "operations" tab, and select "Start Program" under "operations" in the pop-up dialog box ", then, Click Browse to find the script file to be backed up in advance and click OK. In this way, the system automatically backs up data at every day based on the settings. (Figure 3)

Figure 3 storage location

Ii. Share "scheduled tasks"

Client hosts in the enterprise environment are deployed in a unified manner. In particular, there are many backups in the same department. Do you need to create scheduled tasks on each host? No! We can export the Backup Task and release it to other hosts through the LAN, so that we can implement shared backup. In order to save space and facilitate the description, we will proceed on the basis of the above example.

In the task scheduler window, right-click the created task "data backup" and select "Export", and export the data backup according to the wizard. xml file, and then the file is uploaded to the file server for sharing. If you have a host similar to a backup task, download the file, start the scheduled task program, and click "Operation> Import Task" to import the task file. (Figure 4)

Figure 4 import a scheduled task

Make sure that the "scheduled Task" is executed. Check whether the access to the Task Scheduler is started. If the access to the Task Scheduler is not started, start the Task. In addition, some employees have changed the system username during the unified deployment to ensure the execution of tasks. On this computer, double-click the task you just imported, switch to the "General" tab, click "change user or group", and then specify as the user on the employee's own machine, in this way, tasks can be shared on the LAN. (Figure 5)

Figure 5 Share a scheduled task

3. System Monitoring ensures "scheduled tasks" are executed

Sometimes, for some reason, "scheduled tasks" are not executed, which is not allowed for data backup. How do you know if the scheduled tasks are running? In fact, you only need to bind the records of the Event Viewer with the task plan. In this way, once the system encounters any problems, we will know and handle them in time. The following is an example:

Step 1: Enter "eventvwr. msc" in the "Start search" box and press the Enter key to bring up the event viewer. Expand Event Viewer (local) → application and service logs → Microsoft → Windows → TaskScheduler → Operational on the left. Multiple historical times are displayed in the middle, find an error event, right-click it, and select "Attach task to this event ".

Step 2: In the open create basic task wizard window, enter the Task Name and description, click "Next" twice to go to the "operations" page, and select "Display message. Click "Next" to set the content of the message box. For example, set "title" of the window to "scheduled task error" and "email" (actually the content in the message box) set to "because the scheduled Task Service is incorrect, the data backup plan may not be completed. Please check ".

Step 3: click "Next", "Finish", and "OK" consecutively, and then return. Now, in the "Event Viewer task" of the scheduler program, you will find the task you just added. In the future, a message box is displayed when the task plan is not started properly. (Figure 6)

Figure 6 scheduled task error messages

Extension: You can use this function to generate virus alerts. When anti-virus software is disabled for a virus, an alarm is triggered in the message box. In addition, you can monitor accounts and set event associations. A warning dialog box is displayed when a strange account is created in the system.

4. Multiple operations for a single task under XPIn Windows XP, a "scheduled task" task can only implement one operation. How does one implement multiple operations for a single task like Vista? In fact, we can implement it through batch processing. The principle is: Write the operation task to be implemented into a batch processing file, and then call the batch processing file in the scheduled task to implement multiple operations. The following uses WinRar to package, back up, and upload files as an example:Task:1. Package backup d: All files under datadoc(wordfile is data.rar.2.upload and share the data.rar file to // 192.168.1.6/share.Step 1: Create a batch file test. bat and enter the following content:Path = c: Program FilesWinRARRar.exe a data.rar d: est *. docCopy date.rar \ 192.168.1.20shareTip: the first line specifies the rar (WinRar command line tool) file path. The second line is to pack all the docfiles under d: estinto data.rar, and the third line is the beibeidata.rar file to the share folder on the file server (192.168.1.20.Step 2: Click Start → program → attachment → System Tools → schedule task, and create a scheduled task "backup upload" according to the Wizard. in step 1 of adding a program, specified as the created batch file test. bat. In this way, XP implements the same single plan and multiple operations as Vista.5. "scheduled task" faultsTo enable Vista to "Schedule Tasks" to better serve us, it is necessary to understand the relevant faults. Sometimes, a scheduled task cannot be executed as planned, and the task is stranded. Why? In my case, there are three major causes of the "scheduled task" fault:1. Blind System Optimization SequelaeTo improve the performance of the Vista system, users often close some Windows Services by using tools or manually. If the "Task Scheduler" service is accidentally disabled, the scheduled Task cannot run. The solution is simple, that is, execute "Start → run → serveices. msc, open the System Service Management window, find the "TaskScheduler" service, change it to manual or automatic, and then click "enable.2. account password.The security of the Vista system is greatly enhanced. If your system administrator account (usually administrator) does not set a password, you have created a "scheduled task", and the task may not be executed. In addition, if you change the system password after setting a scheduled task, the scheduled task may not run properly. The solution is very simple. The former is to set a password for the administrator and then create a scheduled task. The latter is to re-Modify the scheduled task, make the new password take effect in the security authentication for the scheduled task execution.3. Task-related program errorYou often need to call the program for scheduled operations. If the program file is deleted, moved, or damaged, the program cannot be run if it cannot be found. The solution is to re-fix the corresponding program file.

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.