德尔福'闹钟'般的应用程序

Joh*_*erg 5 delphi scheduled-tasks

我需要制作一个简单的闹钟应用程序,而不是播放声音,将文件上传到ftp(让后者弄清楚).事实证明,在执行线程时,定时器无效.

这是我到目前为止所得到的:

var
ttime     : tDateTime;
timerstr  : string;
timealarm : string;
aThread : TMyThread;
begin
aThread := tMyThread.Create(false);
ttime := Now;
timestr := FormatDateTime('hh:nn:ss', ttime);
timealarm := '09:30:30';
if timestr = timealarm then
aThread.Resume; //The thread will execute once and terminate;
end;
Run Code Online (Sandbox Code Playgroud)

你们能想出另一种方法,让这种命令每天以更有效的方式发生一次吗?

谢谢.

Joh*_*erg 6

找到解决方案:CRON Scheduler

谢谢LU RD和Runner.

  • 我们一直在使用CRON调度程序和Chromis Directory监视一段时间,永远不会回头看.优秀的软件. (4认同)
  • +1.使用计划程序,您甚至可以将计算机设置为在当时已关闭时启动.这是最佳解决方案. (3认同)