Newb寻找计划任务的帮助 [英] Newb looking for help with scheduled task

查看:58
本文介绍了Newb寻找计划任务的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。我正在尝试运行一个非常基本的脚本,将每日文件上传到FTP服务器。我使用了以下脚本:

http://www.howtogeek.com/howto/windows/how-to-automate-ftp-uploads -from-the-windows-command-line /

Hi. I'm trying to run a very basic script that uploads a daily file to an FTP server. I used the following script: http://www.howtogeek.com/howto/windows/how-to-automate-ftp-uploads-from-the-windows-command-line/

脚本(名为upload.bat) 位于C:\ temp中,这是也可以找到要上传的文件(名为inventory.csv)。 从命令提示符窗口启动时运行成功,如下所示:

The script (named upload.bat) is located in C:\temp, which is where the file to be uploaded (named inventory.csv) is also located. It runs successfully when initiated from a command prompt window as follows:

C:\ temp> upload inventory.csv

C:\temp>upload inventory.csv

然后,我创建了一个计划任务(名为Wholesale Inventory Upload2),每天早上无人值守地运行脚本。我创建了一个位置为\的任务(我似乎无法将其放置在其他位置),在每天早上6:30添加触发器以及"启动
一个程序"的操作。我将程序/脚本设置为C:\ temp \ upload.bat,并将参数设置为inventory.csv。

So I then created a scheduled task (named Wholesale Inventory Upload2) to run the script unattended every morning. I created a task with a location of \ (I couldn't seem to place it elsewhere), added a trigger to run daily at 6:30am, and an action to "start a program." I set the Program/Script as C:\temp\upload.bat, and I set the argument as inventory.csv.

脚本似乎运行没有错误,但它是没有上传文件。所以我认为这个论点没有被正确传递,或者其他事情正在发生,我不知道。当我查看任务时,它只显示它运行,
状态"操作成功完成。 (为0x0)"。这是今天早上的任务历史:

The script appears to run without error, but it is not uploading the file. So I'm thinking that the argument is not being passed properly, or something else is happening that I'm not aware of. When I look at the task it simply shows that it ran, with the status "The operation completed successfully. (0x0)." Here's the task history from this morning:

任务计划程序已启动"{529dd6e1-3a7c-4a2d-8992 -621690d43dd7}" "\Wholesale Inventory Upload2"的实例用户"xxx \ xxxx"的任务。

Task Scheduler started "{529dd6e1-3a7c-4a2d-8992-621690d43dd7}" instance of the "\Wholesale Inventory Upload2" task for user "xxx\xxx".

任务计划程序已启动的操作"C:\ Windows \SYSTEM32 \ cmd.exe"例如"{529dd6e1-3a7c-4a2d-8992-621690d43dd7}"任务"\Wholesale Inventory Upload2"。

Task Scheduler launched action "C:\Windows\SYSTEM32\cmd.exe" in instance "{529dd6e1-3a7c-4a2d-8992-621690d43dd7}" of task "\Wholesale Inventory Upload2".

任务计划程序已成功完成任务"\Wholesale Inventory Upload2" ,instance" {529dd6e1-3a7c-4a2d-8992-621690d43dd7}" ,action"C:\ Windows \ SYSTEM32 \ cmd.exe"返回码为0。

Task Scheduler successfully completed task "\Wholesale Inventory Upload2" , instance "{529dd6e1-3a7c-4a2d-8992-621690d43dd7}" , action "C:\Windows\SYSTEM32\cmd.exe" with return code 0.

任何帮助指出我缺少的东西和/或做错了将非常感谢!

Any help pointing out what I'm missing and/or doing wrong would be greatly appreciated!

John

推荐答案

您的脚本未处理错误。

Your script is not processing errors.


这篇关于Newb寻找计划任务的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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