【问题标题】:Execute a method at given time (with threads)在给定时间执行方法(使用线程)
【发布时间】:2015-09-24 08:38:05
【问题描述】:

我想在给定时间(例如每天晚上 7 点)执行一个方法。我的第一个想法是每秒使用TTimer 检查当前的TDateTime,但它不是线程安全的。我该怎么做?

【问题讨论】:

标签: delphi delphi-10-seattle


【解决方案1】:

我会使用操作系统并配置一个在给定时间启动 Delphi 应用程序的计划任务。

【讨论】:

    猜你喜欢
    • 2019-04-15
    • 1970-01-01
    • 2011-09-30
    • 2019-10-03
    • 2017-05-22
    • 1970-01-01
    • 2011-12-26
    • 1970-01-01
    • 2019-09-22
    相关资源
    最近更新 更多