加入收藏 | 设为首页 | 会员中心 | 我要投稿 衡阳站长网 (https://www.0734zz.cn/)- 数据集成、设备管理、备份、数据加密、智能搜索!
当前位置: 首页 > 服务器 > 搭建环境 > Windows > 正文

windows-server-2003 – 有没有办法将计划任务从Windows 2003(.j

发布时间:2021-01-13 00:26:02 所属栏目:Windows 来源:网络整理
导读:我有一些工作要从旧的生产服务器( Windows 2003服务器标准)移动到新机器(Windows 2008服务器标准),但新服务器无法读取旧的.job格式,导入向导只能从.xml作业文件(相同版本).显然,我不想手工重建所有工作,但找不到使工艺变得更容易的工具.我不相信微软的这种工

我有一些工作要从旧的生产服务器( Windows 2003服务器标准)移动到新机器(Windows 2008服务器标准),但新服务器无法读取旧的.job格式,导入向导只能从.xml作业文件(相同版本).显然,我不想手工重建所有工作,但找不到使工艺变得更容易的工具.我不相信微软的这种工具,我以前的经历一直很糟糕(DTS – > SSIS).有任何想法吗?

提前致谢.

看起来他们在这里讨论问题: http://social.technet.microsoft.com/Forums/en-US/itprovistamigration/thread/76b6276b-49f2-41e2-b4ea-f537e0eb88a8

似乎没有目前批准的方法来做到这一点.

但该论坛中的一位用户发布了这样的信息

如果从vista / 2008服务器上运行schtasks,可以将xp / 2003 schtasks导出到xml. schtasks / query / s xpmachine / tn taskname / XML> taskname.xml然后你可以导入它.不完美但可以节省时间.我使用/ fo table打开任务导出excel删除不需要的列并创建批处理文件以转储xmls然后/ create / xml xmlfile.xml将xmls导入新服务器.希望这可以帮助.

所以它似乎有可能,但它需要一些jiggery pokery.

我自己试了一下,但继续从Win2008获取访问被拒绝的错误.即使我是具有所有权限的网络管理员.也许别人可以尝试一下?

编辑 – 解决方案:

Where you got your job files was probably c:windowstasks,however under Vista there is a new place the xml files exist. (Under c:windowssystem32tasks)
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 WindowsSystem32 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:windowssystem32.
  • Rename your job files Test1.job,Test2.job,Test3.job,Test4.job and copy them into c:windowstasks
  • 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.

我亲自试过这个,是的确有效.编写脚本只需要花费一点力气.您只需将xp文件保留在vista机器上即可.然后,您也可以通过脚本将它们导出为XML.

链接:From experts exchange

(编辑:衡阳站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读