How can I modify triggers in Delphi 5

This forum is designated to discuss SiComponents Scheduling Agent.
Post Reply
CarlDippel
Posts: 15
Joined: Thu Nov 13, 2003 7:41 pm
Location: LI, NY
Contact:

How can I modify triggers in Delphi 5

Post 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
Anonymity negates sincerity.
CarlDippel
Posts: 15
Joined: Thu Nov 13, 2003 7:41 pm
Location: LI, NY
Contact:

After a week I sent this email.

Post 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 --
Anonymity negates sincerity.
CarlDippel
Posts: 15
Joined: Thu Nov 13, 2003 7:41 pm
Location: LI, NY
Contact:

This reply was emailed to me

Post 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:
Anonymity negates sincerity.
CarlDippel
Posts: 15
Joined: Thu Nov 13, 2003 7:41 pm
Location: LI, NY
Contact:

How is the bug fix coming?

Post 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
Anonymity negates sincerity.
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post 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.
CarlDippel
Posts: 15
Joined: Thu Nov 13, 2003 7:41 pm
Location: LI, NY
Contact:

Sorry about the misunstandering.

Post by CarlDippel »

Please send me the full setup package by email. to cdippel@optonline.net :D Thanks. -Carl
Anonymity negates sincerity.
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Done
Post Reply