Word Bulk Add Scheduled Tasks

Source: Internet
Author: User
Tags schtasks

For work reasons, you need to add and set up a one-time scheduled task in Windows XP. In accordance with the normal idea is to open the Control Panel, click on "Performance and Maintenance" → "task Plan", and then double-click "Add Task Plan" to make a set. However, because there are so many, you have to dismiss this idea and intend to add the task plan in bulk from the command line. In Windows XP Help file, check the command line format for a one-time scheduled task: Schtasks/create/tn taskname/tr taskrun/sc once/st starttime/sd startdate [/S CO Mputer [/u [domain]user/p password]] [/ru {[Domain]user | ' System '} [/RP Password]] (schtasks/create/tn scheduled Task Name/tr program/sc once/st start/sd start date [/s computer [/u [domain] username/p password]] [/ RU {[domain] User name | "System"} [/rp password]], figure 1).

According to the instructions, the actual, first attempt to write an example: Schtasks/create/tn "1F"/tr d:ok.js/sc once/st 00:10:00/sd 2006/04/08/ru 987412365. Analysis, the bulk add scheduled tasks, where changes are scheduled task name, start time two parameters. Where the former can be any name, the latter can be set to interval one (paragraph) time, depending on the actual need, it seems that combining Excel and Word can quickly write the command-line text for the bulk add scheduled task.

The first step: Create a new EXCE document and enter it in the B1 cell: "1F, and then place the cursor in the lower-right corner of the B1 cell, and when it becomes an automatic fill handle, drag down to generate the names of multiple scheduled tasks (the number equals the actual number of scheduled tasks), such as to generate 100 scheduled task names, and then drag to the 100F "(Fig 2);

Step Two: Right-click the D column cell and choose Format Cell. Switch to the Number tab in the pop-up window and select Custom in category to fill in type: Hh:mm:ss (because the start time for adding a scheduled task on the command line is the format: HH:MM:SS, so set , as shown in Figure 3, the following date settings are also the same), determined to exit after. Then set the task start time in D1, D2, respectively: 00:10:00, 00:16:00 (assuming that the 1th task starts at 00:10:00 and the 2nd task starts at 00:16:00), select the D1, D2 cell, and place the mouse in the lower-right corner of the D2 cell. When it becomes an automatic fill handle, drag the last row of the scheduled task name to the next line;

Step Three: Right-click the F column cell, select format cells, switch to the Number tab in the pop-up window, and select Custom in category to fill in the type: YYYY/MM/DD (Figure 4), OK, and then exit after F1, Enter the start date for the scheduled task in cell F2:2006/04/08, 2006/04/08, and drag the mouse to the last row;

Fourth step: In A1, C1, E1 cell input: schtasks/create/tn,/tr d:ok.js/sc (Note: The above parameters in the middle of a separate empty

,/SD, in G1, G2 cell input:/ru zlszls/rp 987412365,/ru zlszls/rp 987412365, and then drag the mouse to generate all the scheduled command line statements;

Step Fifth: Press CTRL + A to select all command line statements, press CTRL + V to copy, then open emeditor to paste the content, press Ctrl+h to open the Replace dialog box, in the "Find" field enter: "(Chinese Input method in the state of the left double quotes), in the" Replace with "field entered:" ( Double quotation marks in the state of the input method, click the "Replace All" button to replace (Figure 5).

In a similar way, replace the right Chinese double quotes with the English double quotes, copy all the statements in the EmEditor and paste them into a blank Word document, and then press ctrl+h in Word to open the Find and Replace dialog box, click the mouse in the Find what box, and then click "More" below. button, select "Special format" → "tab", and then click the SPACEBAR in the Replace with box, then tap the Replace All button (Figure 6), and finally save the document in plain text format;

Step Sixth: Change the. bat batch file by changing the text file that was generated in the previous step, and double-click it to add a one-time scheduled task in Windows XP in bulk (Figure 7).

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.