Contact Information
+27 11 674 1174

Web Design

We specialize in Joomla! web design, custom templates and Joomla! hosting.  Toxzen also develop custom data driven PHP web applications.

Web Hosting

Affordable Web Hosting services, domain registration and email.  Our business Web Hosting packages are perfect for your growing business.

How To Export Vista Scheduled Tasks

Rate this item
(2 votes)

Windows Vista's new interface allows for a lot of advanced features, one of which is the import and export of scheduled tasks.  This easy tutorial will show you how to export your scheduled tasks.

To start you need to click on the windows Start orb.  Then RIGHT click on Computer and select "Manage".  The Computer Management window will open, where you will see a tree node on the left called "System Tools" and below that "Task Scheduler".  Open this node.  Then Click on "Task Scheduler Library" where all your tasks will appear on the right.  If you RIGHT click on the task it will give you option to export the task.  Save it to an XML file as it prompts you.

Vista Scheduled Tasks

These exported tasks can be backed up and later imported, or if you have made a useful one you want to share you could give it to a friend.  Also good for IT support staff who could deploy tasks across their clients PC's

To export ALL your scheduled tasks you need to go into the DOS CMD prompt and maybe home users could play with this option if you can't access the Computer Management console.  To get the CMD window you need to press the Windows key+R or go to the Start Orb and click on Run on the main menu.  In there type CMD and press enter.  A black command window will appear.  In there you will probably find that the default location is: C:\Windows\System32You do not want to work in this folder! Change it by typing CD \ and the full name of the folder you want to be in.  For example I have a temp folder off of my C drive so I would type CD \temp

In this new folder location we can start playing... Type schtasks /query /xml > schedtasks.xml which will now dump all your Vista scheduled tasks to a file.  The files name will be schedtasks.xml and it will be in XML format, which can be read by any text editor, even notepad.

Additional Info

  • Software: Vista, Win 7
  • NOTE: This will probably only work for certain versions of Vista as versions like Home might not allow you to view the Computer Management console. Working in the command window is for advanced users and if you do - Never work in your windows\system32 folder! Always create a temporary folder elsewhere to work in.
1 subscriber

Comment subscription

Receive email notification when a new comment is added to this item.

1 Comment

  • Comment Link an0_nym0u5@yahoo.com Thursday, 13 January 2011 15:03 posted by [email protected]

    Here's how to export and import all tasks in Windows 7 or Windows 2008 Server's command line

    1) Create a task list with a) name of the task and b) filename for XML file, where the task parameters will be exported.

    schtasks.exe /query /fo CSV|Findstr /v "^\"TaskName\".*$">TaskList.txt

    Explanation:
    schtasks.exe = Command for listing, creating and editing Scheduled Tasks.
    /query = List tasks
    /fo = Format Output.
    CSV = Output format is Comma Separated Values.
    | = Pipe = Pass the results from the left side of the pipe character to the right side.
    Findstr = Command to filter the headers from the output.
    /v = Show all but matching lines.
    "^\"TaskName\".*$" = Regular expressions saying: Match lines beginning with: "Taskname"
    >TaskList.txt = Put the result in the TaskList.txt file.

    The TaskList.txt now contains list of all the tasks, one task per line. After installation Windows 7 has about 70 preconfigured tasks.
    The TaskList.txt looks like this
    --------------------------------------------------------------------------------
    ....
    "\Microsoft\Windows\Autochk\Proxy","N/A","Ready"
    ....
    "\Microsoft\Windows\Defrag\ScheduledDefrag","19.1.2011 2:12:10","Ready"
    ....
    --------------------------------------------------------------------------------

    You can edit TaskList.txt to remove the task lines you don't want to copy to the target computer.

    2) Export = Create a XML file for each task.
    FOR /F "tokens=1,2* delims=," %a IN (TaskList.txt) DO schtasks.exe /query /TN "%~a" /XML > "%~nxa.xml"

    Explanation:
    FOR = Use For command to handle the TaskList.txt.
    /F = This For command uses switces.
    For command switces: two or more parameters (tokens=1,2*) delimited with commas (delims=,).
    %a = The first parameter name is 'a', second is 'b' and so on.
    "%~a" = The task name is the first parameter of each line (e.g "\Microsoft\Windows\Autochk\Proxy").
    /XML = Output format id XML.
    > "%~nxa.xml" = Put the result in this file (e.g "Proxy.xml")

    Warning!
    If many tasks has the same name ("Proxy.xml", see example above), only the latter will be exported.

    3) Import.
    Copy the TaskList.txt and the XML files you exported to target computer and run this at target computer's command line to create the the tasks.
    FOR /F "tokens=*" %a in (TaskList.txt) do @echo schtasks.exe /create /TN "%~a" /XML "%~na.xml" > TaskList.log 2>&1

    The TaskList.log has log of each schtasks.exe /create event telling you whether the create was OK or not.

Leave a comment

Make sure you enter the (*) required information where indicated.
Basic HTML code is allowed.