本文介绍了如何在指定时间每天执行一个方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在该时间存储在变量中的特定时间执行方法。变量从数据库中获取时间,以便用户可以在数据库中指定该时间。如果将它与windows时间进行比较,程序会自动执行所述方法。

即使程序没有运行,也可以执行此方法。我的意思是像进程外服务或Windows服务。



虚假粗体和代码块被删除 - OriginalGriff [/ edit]



大家好!

感谢您的所有答案。让我们保持简单:我有一个方法,我希望用户能够在用户指定的时间执行。此时间应存储在数据库中,程序会自动检索该时间,并与该时间每天自动运行该方法的窗口时间进行比较。我不知道在程序运行时如何执行此操作,我只是想知道在程序未运行时是否可以执行此操作,但是在我打算编写的程序运行时让这项工作更重要。



再次感谢!

How can one execute a method at a specific time where that time is stored in a variable. The variable gets the time from a database so the user can specify that time in the database. If it is compared to the windows time the program automatically should execute said method.
Is it possible to have this method execute even if the program is not running. I mean something like an out of process service or a windows service.

[edit]Spurious bold and code block removed - OriginalGriff[/edit]

Hello everyone!
Thanks for all your answers. Let's keep it simple: I have a method I want the user to be able to execute at a time this user specified. This time should be stored in a database and the program automatically retrieves that time and it compares to the windows time the method should be run automatically once every day at that time. I don't know how to do this while the program is running and I was just wondering if this operation is possible while the program is not running, but it's more important to me to make this work while the program I intent to write is running.

Thanks again!

推荐答案




这篇关于如何在指定时间每天执行一个方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 00:02
查看更多