6

I had some jobs to be moved from the old production server (windows 2003 server standard) to the new machine (windows 2008 server standard), but the new server is unable to read the old .job format, also the import wizard only imports from .xml job files (same version). Obviously I don't want to rebuild all the jobs by hand, but can't find a tool that makes the process a very little easier. I don't trust in Microsoft for this kind of tools, my previously experiences had been to bad (DTS -> SSIS). Any ideas?

Thanks in advance.

3 Answers 3

12

Looks like they were discussing the problem here: http://social.technet.microsoft.com/Forums/en-US/itprovistamigration/thread/76b6276b-49f2-41e2-b4ea-f537e0eb88a8

Seems like there is no current approved method of doing this.

However one user in that forum posted this:

If you run schtasks from the vista/2008 server maching you can export the xp/2003 schtasks to xml. schtasks /query /s xpmachine /tn taskname /XML > taskname.xml then you can import it. not perfect but can save time. i exported the tasks using /fo table opened that to excel deleted unneeded columns and created a batch file to dump the xmls then /create /xml xmlfile.xml to import the xmls to the new server. hope this helps.

So it seems possible but it needs some jiggery pokery.

I tried it out myself but kept on getting access denied errors from Win2008. Even though I was the network admin with all privileges. Maybe someone else could make an attempt?

EDIT-Solution:

Where you got your job files was probably c:\windows\tasks, however under Vista there is a new place the xml files exist. (Under c:\windows\system32\tasks) Try looking there on your old machine if possible.

HOWEVER, there is a way if you can't get to the original machine easily.

  • You will need 2 files off an XP machine (Schtasks.exe and Schedsvc.dll) they are both in the Windows\System32 folder, copy them to USB and thats all you need from XP.
  • Now on your Vista machine. Put them in their own directory on your vista machine (lets say you make a directory called c:\sch and put those 2 files in there) DO NOT overwrite the vista ones in c:\windows\system32.
  • Rename your job files Test1.job, Test2.job, Test3.job, Test4.job and copy them into c:\windows\tasks
  • Open up a command prompt (Start Programs, Accessories, right click on Command Prompt and select run as administrator)
  • Now to touch over the new .job files to get vistas scheduler to take on the parameters.
  • In your command prompt
    type in cd c:\sch then enter (for our example)
  • Now for each job type in schtasks /change /TN "Test1" /RU Terry /RP Terry (Changing the Test1 to Test2, Test3, Test4 for our example) The /RP and /RU values will have to change, thats a username and password (RP being password, RU Being User)
  • You should receive the message SUCCESS: The parameters of scheduled task "Test1" have been changed. for each job.

When done close your command prompt. From there Windows scheduler now knows about these, and you can use the windows Gui to update their names, and who they run as.

I have tried this personally and yes it does work. It would only take a little more effort to script it. You just need to leave the xp files on the vista machine. You could then export them as XML via script as well.

Link: From experts exchange

7
  • Thanks qwerty, I've already readed that. I'm looking for a tool that do the transformation, because the "solution" given in that thread, besides tricky, also involves extra work that in my case involves reconfigure the whole job.
    – Rodrigo
    Jul 22, 2009 at 16:21
  • Answer updated with a solution. It is simpler than the previous solution and would be easily scriptable. I don't think it is going to be any easier than this.
    – Qwerty
    Jul 23, 2009 at 0:37
  • Thank you for this. Ironically on the MSDN forums a MSFT employee claimed there was no way of doing this! Sep 11, 2009 at 18:45
  • Nice - worked to a tee. Was worried at first because procedures with this many steps almost never work as described but it ran smoothly for me.
    – user69116
    Feb 1, 2011 at 21:59
  • 2
    This was great. Worked like a charm moving from Window 2003 to Windows 2008 R2. A few notes: 1. I did not have to rename the items. You can reference them with the existing name and it works. 2. Once the "conversion" is completed, a new file appears in \Windows\System32\Tasks that is the new file used by the task scheduler and the old .job file (the one you copied in from the original system) can be deleted from \Windows\Tasks.
    – user67191
    Feb 1, 2011 at 21:59
10

I found another way that was even easier, for me; it requires more clicking, but less actual thinking. You have to be able to "connect" to your old Windows Server 2003 machine from a Windows Server 2008 machine.

On the Win2k8 box, open the Task Scheduler (from the "Administrative Tools" menu, not Server Manager). Click on the "Task Scheduler (Local)" node, then in the Actions, you can choose "Connect to another Computer"; connect to your Win2k3 machine.

Now, when you click on the "Task Scheduler Library", you'll see all of your Win2k3 tasks. At this point you can right-click on the task you want and choose "Export...". You now have an .xml file that you can directly import into a Win2k8 Task Scheduler!

1
  • FYI, there were a couple tasks that for some reason didn't show up when I connected remotely like this. On the 2003 machine, I made a copy of those tasks (saved as job file onto desktop and moved back into scheduled tasks with a different name) and then they showed up when connected remotely.
    – Mafu Josh
    Aug 20, 2014 at 13:51
1

Although the above answers that describe the manual process worked for me as well, I wanted an easier way to do it and came up with this: http://briandunnington.github.io/migrate-scheduled-jobs.html

Essentially, you copy your .job files to c:\windows\tasks, then run the script (providing a username/password) and your jobs are automatically converted - no messing with copying old dlls or renaming things, etc.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .