Win 2008 R2 64位VFP计划任务问题

发布于 2024-10-30 18:45:34 字数 228 浏览 3 评论 0原文

我正在尝试将多个 Visual Fox Pro 9.0 应用程序从 Win 2003 迁移到 Win 2008 R2 64 位服务器。

登录的用户与计划运行任务的用户是同一用户。

当应用程序手动运行时(浏览到文件夹并双击),它会成功运行。

当应用程序通过任务计划程序运行时,它似乎在运行,但应用程序永远不会在任务计划程序或任务管理器的进程选项卡中结束。

阿希亚, 拉里·R...

I am attempting to migrate several Visual Fox Pro 9.0 apps from Win 2003 to Win 2008 R2 64 bit server.

The user logged in is the same user that the task is scheduled as to run.

When the app is run manually (browse to the folder & double click), it run successfully.

When the app is run via the Task Scheduler, it appears to run, but the app never ends in the task scheduler nor in the processes tab of the Task Manager.

AHIA,
LarryR...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

独留℉清风醉 2024-11-06 18:45:34

如果您的 VFP 应用程序在 2008 R2 服务器上运行,并且您的客户端运行 Vista 或 Windows 7,那么您可能会遇到 SMB2 和 Oplock 问题。此问题将表现为奇怪的挂起、文件损坏和诸如“尝试锁定”之类的消息。我们发现有必要将客户端降级到 Windows XP 才能解决该问题。 (对于用 VFP 6 或更早版本编写的任何旧版应用程序)。如果在客户端和服务器上禁用 SMB2,VFP 9 应用程序似乎可以在 Vista 和 Win 7 上正常运行。 (两者都会自动恢复为 SMB1)。请参阅以下 Microsoft 文章:

http://support.microsoft.com/kb/296264
http://social.msdn.microsoft.com/Forums/en/visualfoxprogeneral/thread/6c62418d-08f8-495a-bbd4-f93151ec1f05

禁用 SMB2 是一个相对轻松的过程,尽管您需要在每个工作站上执行此操作和运行旧应用程序的服务器。

If your VFP app is running on a 2008 R2 server and your clients are running Vista or Windows 7, then you may be having problems with SMB2 and Oplocks. This problem will manifest itself in strange hangs, file corruption and messages such as "Attempting to lock". We found that it was necessary to downgrade our clients to Windows XP to correct the problem. (For any of the legacy apps written in VFP 6 or older). VFP 9 apps appear to run fine on Vista and Win 7 if SMB2 is disabled on both client and server. (Both will automatically revert to SMB1). Please sse the following Microsoft articles:

http://support.microsoft.com/kb/296264
http://social.msdn.microsoft.com/Forums/en/visualfoxprogeneral/thread/6c62418d-08f8-495a-bbd4-f93151ec1f05

Disabling SMB2 is a relatively painless process, though you'll need to do it on each and every workstation and server that runs a legacy app.

你げ笑在眉眼 2024-11-06 18:45:34

遇到同样的问题,我们的 VFP 8.0 应用程序在执行时可以正常运行
手动但在 Windows Server 2008 R2 下设置为计划任务时挂起且不会出现错误。从布莱恩在这个线程中获得了解决方案的基础知识(http://social.technet.microsoft.com/Forums/en-US/winservermanager/thread/d47d116e-10b9-44f0-9a30-7406c86c2fbe)并且此修复适用于us:

设置计划任务来调用批处理文件,然后批处理文件调用应用程序。然后检查以下步骤:

  1. 确保任务设置为“配置 Windows Vista 或
    Windows 2008”位于任务属性的第一页(在
    “常规”选项卡)
  2. 确保任务设置为“开始于”
    包含批处理文件的文件夹:打开任务属性,单击
    在“操作”选项卡上,单击该操作,然后单击“编辑”按钮
    在底部。在“编辑操作”窗口中,有一个字段用于
    “开始于(可选)”您设置为批处理文件的路径。
  3. 确保该任务作为具有明确权限的帐户运行
    对所有这些内容的“完全访问”权限:.bat 文件本身,
    包含 .bat 文件的文件夹以及目标文件/文件夹
    受 .bat 脚本影响。继承的权限没有
    似乎对我有用。
  4. 确保运行任务的帐户
    是该计算机本地“管理员”组的成员
  5. 确保该任务设置为“无论是否登录都运行”
  6. 当您
    右键单击该任务并选择“运行”如果确实如此,那么它
    当您注销时将成功运行。

我们在 Windows 2003 下使用相同的 Visual FoxPro 应用程序没有遇到任何问题,因此这绝对是 Windows 2008 R2 中安全/计划更改的结果。

Had this same problem where our VFP 8.0 application would run fine when executed
manually but hang without error when setup as scheduled task under Windows Server 2008 R2. Got the basics of the solution from Brian in this thread here (http://social.technet.microsoft.com/Forums/en-US/winservermanager/thread/d47d116e-10b9-44f0-9a30-7406c86c2fbe) and this fix worked for us:

Setup the scheduled task to call a batch file which then calls the application. Then check these steps:

  1. Make sure that the task is set to "configure for Windows Vista or
    Windows 2008" on the first page of the task properties (under the
    "general" tab)
  2. Make sure that the task is set to "start in" the
    folder that contains the batch file: open the task properties, click
    on the "actions" tab, click on the action and then the "edit" button
    at the bottom. In the "Edit Action" Window there is a field for
    "start in (optional)" that you set to the path to the batch file.
  3. Make sure that the task is running as an account that has explicit
    "Full access" permissions to all these things: The .bat file itself,
    the folder containing the .bat file, and the target files/folders
    that are affected by the .bat script. Inherited permissions didn't
    seem to work for me.
  4. Make sure that the account running the task
    is a member of the local "administrators" group for this machine
  5. Make sure that the task is set to "run whether logged on or not"
  6. The Task should run successfully with expected output when you
    right-click on the task and select "run" If it does that then it
    will run successfully when you are logged off.

We had no problems with the same Visual FoxPro application under Windows 2003 so definetly a result of security/schedule changes in Windows 2008 R2.

城歌 2024-11-06 18:45:34

如果您编写了该应用程序,我会在代码中的各个位置添加一些简单的日志记录到文件中,这样至少您可以看到它卡在哪里。 STRTOFILE() 函数可能是最简单的方法。
PS 2003 年至 2008 年的迁移有何相关性?你是说它在 2003 年工作正常,但现在在 2008 年就不行了?

If you wrote the app I would put some simple logging to file at various places in your code so at least you can see where it is getting stuck. The STRTOFILE() function is probably the easiest way.
PS What is the relevance of the migration from 2003 to 2008? Are you saying it worked OK on 2003 and now doesn't on 2008?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文