Page 1 of 1

How can I modify triggers in Delphi 5

Posted: Thu Nov 13, 2003 8:07 pm
by CarlDippel
I want to programmatically adjust the trigger of a task so it starts daily at sunset. I have a routine: Suntime, that given the latitude, longitude, and date will return the time of sunrise and sunset. :D The code below results in this:

schedule = At #:## PM on MM/DD/YY
next runtime = Never :(

I want this:

schedule = At #:## PM everyday, starting MM/DD/YYYY
next run time = #:## PM MM/DD/YYYY :)

What is missing or wrong this this code? :?:

Code: Select all

:
:
task.Activate;
task.Triggers.Clear;
with task.Triggers.Add do
  begin
    BeginDate:=Date;
    Enabled:=True;
    StartTime:=Suntime.Sunset;
  end;
task.Deactivate(True);
:
:
Thanks a 1E6! -Carl

After a week I sent this email.

Posted: Sat Nov 22, 2003 6:29 pm
by CarlDippel
From: Carl Dippel
To: support@sicomponents.com
Sent: Friday, November 21, 2003 5:49 PM
Subject: Scheduling Agent

I'm a registered user. I'm having difficulty creating a trigger to a new task.
I want the task to run at 3:00 AM every day.

My program has this code:

Code: Select all

  task.Triggers.Clear;
  with task.Triggers.Add do
    begin
      Enabled:=True;
      StartTime:=0.125;
      BeginDate:=Date;
      TriggerType:=ttDaily;
      TriggerDetails.Daily.DaysInterval:=2;
      Details:=TriggerDetails;
    end;
  task.Triggers.UpdateTriggers;
  task.Deactivate(True);
This is what is displayed in "Scheduled Tasks"
Schedule: At 3:00 AM every day, starting 11/20/03
Next Run Time: never
The task never runs. What am I doing wrong?
I posted this question on the forum with no response.

-- Carl Dippel carl@dippel.us www.dippel.us/carl --

This reply was emailed to me

Posted: Sat Nov 22, 2003 6:36 pm
by CarlDippel
From: Serghei Gaivan
To: Carl Dippel
Cc: Igor Siticov
Sent: Saturday, November 22, 2003 5:00 AM
Subject: Re: Scheduling Agent


Hello,

Sorry for the late response. The problem is caused a bug in saTask.pas. The patched sources will be available at our site soon. In order you code function properly just comment/remove the line:
...
Enabled:=True;
...
that is, remove in your code assignments like TTaskTrigger.Enabled := True;

The fixes we have made in saTask.pas would not require revision your code when you update the Scheduling Agent to the next version.

Best regards,
Serghei Gaivan
YES! I am not as stupid as I thought I was, although I may be as stupid as you think I am. :lol:

How is the bug fix coming?

Posted: Sat Dec 13, 2003 2:16 pm
by CarlDippel
It's been three weeks :!: I was just wondering if there was an hope of getting this bug fix before the new year :?: I need the functionally for which I paid. -Carl

Posted: Sat Dec 13, 2003 4:20 pm
by isiticov
You was sent the instructions to fix this bug manually on your side in case of urgent needs and the official update with this bug fix was released at 8th December. And was available to download from our download page. Unfortunately, we had web server full crash yesterday and some sections of our web site is not yet restored. This means that downloading registered versions of products is not working yet. In case you need full setup package with this bug fixed please e-mail us and we will send you it by e-mail if download section won't be restored till then.
let us know about your decision.

Sorry about the misunstandering.

Posted: Sat Dec 13, 2003 10:02 pm
by CarlDippel
Please send me the full setup package by email. to cdippel@optonline.net :D Thanks. -Carl

Posted: Sun Dec 14, 2003 5:32 am
by isiticov
Done