控制台应用程序在批处理文件中运行并作为计划作业 [英] Console application run in batch file and work as schedule job

查看:65
本文介绍了控制台应用程序在批处理文件中运行并作为计划作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我创建了一个控制台应用程序,用于从共享中读取文件并放入数据库。



现在我希望这个应用程序应该在批处理文件中。这个文件一天只运行一次。



请帮我如何批量生成这个应用程序并作为工作安排?我是批处理和Visual Basic脚本的新手。



我需要为批处理服务器创建任何注册表吗?



安排.Vbs脚本完成工作。为什么这是必需的。请任何人解释我这样做的流程..





提前付款

Sheela KR



我尝试过:



控制台应用程序从共享中读取文件并将数据插入数据库。



此外,我需要创建一个运行我的控制台应用程序的批处理文件。在此之前,它必须读取创建的文件的日期和今天的日期。它必须比较然后exe文件必须执行..

Hi

I have created one console application to read file from share and put in to database.

Now i want this application should be in batch file. and this file run only once in a day.

Please help me how to make this application as batch and schedule as job? I am very new to batch and Visual basic scripts.

Is any registry i need to create for batch server?

schedule job done in .Vbs script. Why this is required. Please any one explain me the flow to do this..


Thanks in advance
Sheela K R

What I have tried:

Console Application to read file from share and insert data into database.

Further I need to create a batch file it has to run my console application. Before that it has to read the date of file created and todays date. it has to compare then exe file has to execute..

推荐答案

不,你不需要访问注册表:只需执行你会发现的EXE文件构建应用程序发行版时的project / release / bin文件夹。



调度是一个操作系统功能:对于Windows,你可以使用任务计划程序(Windows) [ ^ ]并将其设置为每天在特定时间运行应用程序。
No, you don't need to access the registry: just execute the EXE file you will find in your project/release/bin folder when you build the Release version of your application.

Scheduling is a OS function: for Windows you would use the Task Scheduler (Windows)[^] and set it to run the app at a specific time each day.


这篇关于控制台应用程序在批处理文件中运行并作为计划作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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