作为计划任务运行时,程序的行为会有所不同 [英] Program behaves differently when run as a scheduled task

查看:91
本文介绍了作为计划任务运行时,程序的行为会有所不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

具有相同登录用户的绝对相同程序在直接调用时正确运行,但在作为计划任务运行时表现不同。



我缺少什么?欢迎任何建议,提前谢谢。



编辑添加程序说明:

该程序有点像控制台应用程序 - 它从ftp url下载文件以进行进一步处理。具体来说,从调度程序运行时,不会发生ftp下载。我知道身份验证已成功,但没有下载文件。



我尝试了什么:



StackOverflow和MSDN中的某些用户建议这可能是由于用户权限。要检查这一点,我以管理员身份登录,创建任务作为管理员并将任务配置为以管理员身份运行。仍然是相同(错误)的结果。

The absolute same program, with same logged in user, runs correctly when invoked directly, but behaves differently when run as a scheduled task.

What am I missing? Any suggestions welcome, thank you in advance.

Edited to add program description:
The program is kind of like a console app - it downloads a file from an ftp url for further process. Specifically, the ftp download does not take place, when run from the scheduler. I know that the authentication has succeeded, but no file is downloaded.

What I have tried:

Some users in StackOverflow and MSDN suggest this might be due to user permissions. To check this out, I logged in as admin, created task as admin and configured the task to run as admin. Still same (wrong) result.

推荐答案

引用:

该程序是善良的像一个控制台应用程序 - 它从ftp url下载文件以进行进一步处理。具体来说,从调度程序运行时,不会发生ftp下载。我知道身份验证已成功,但没有下载文件。

The program is kind of like a console app - it downloads a file from an ftp url for further process. Specifically, the ftp download does not take place, when run from the scheduler. I know that the authentication has succeeded, but no file is downloaded.



更改您的应用程序以将其活动记录到日志文件中,以便您可以检查以后执行的操作。 />
包含每个步骤,包含允许您检查步骤是否正确的信息。

例如,包含FTP服务器对话框。

这应该帮助您缩小搜索范围。


Change your app to log its activity to a log file, so that you can check what was done afterward.
Include each steps with information allowing you to check if a step was correct or not.
For example, include dialog with FTP server.
This should help you to narrow the search.


这篇关于作为计划任务运行时,程序的行为会有所不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆