创建调度程序以在vb.net中运行代码文件 [英] Creating Scheduler to run a code file in vb.net

查看:68
本文介绍了创建调度程序以在vb.net中运行代码文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在vb.net framework 2.0中创建一个调度程序.假设我想在每天晚上7点运行文件chedulecode.aspx.vb的page_load事件中包含的代码. 怎么会造成这个问题.请提出建议

并记住我不想使用Windows调度程序.我只想让调度程序形成vb.net服务器

I want to create a scheduler in vb.net framework 2.0 . suppose i want to run the code having in page_load event of a file scheduledcode.aspx.vb at daily 7pm..
how can create this problematically. Please Suggest

and remember i dont want to use windows scheduler.. i just want to have scheduler form the vb.net server

推荐答案

将您的应用最小化到Systray,并具有一个线程每分钟轮询一次时间(或更频繁地,取决于您愿意花费的准确时间的误差范围).

HTH
Have your app minimized to the Systray, and have a thread polling the time every minute (or more often, depending upon the margin of error on exact time you are willing to take).

HTH


Quartz.NET [

如果您希望它在特定时间每天运行,那么最好的选择是

0)编写Windows服务并将调度代码放入其中.

1)选择一个应用程序,然后使用Windows Scheduler运行它.

如果是我(已经有好几次了),我会选择Windows服务.
If you want it to run every day at a certain time, your best choices are

0) Write a Windows service and put the scheduling code into it.

1) Wite an application and use the Windows Scheduler to run it.

If it were me (and it has been several times), I''d go with the Windows service.


这篇关于创建调度程序以在vb.net中运行代码文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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