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)
你们能想出另一种方法,让这种命令每天以更有效的方式发生一次吗?
谢谢.
找到解决方案:CRON Scheduler
谢谢LU RD和Runner.