SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

tfRunOnlyIfLoggedOn Flag

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> VCL Scheduling Agent
View previous topic :: View next topic  
Author Message
mike71



Joined: 18 Jan 2005
Posts: 4

PostPosted: Tue Jan 18, 2005 5:39 pm    Post subject: tfRunOnlyIfLoggedOn Flag Reply with quote

SiComponents seems to have trouble clearing the tfRunOnlyIfLoggedOn flag in the Flags property of TTaskItem. I need my task to run even if the user is not logged in, so I need to clear this flag which seems to get set by default. I'm currently testing using the Delphi Demo app, but everytime I clear the this flag it simply ignores the instruction and resets it. I've verified that the Demo code is actually attempting to clear the flag, the change just won't seem to stick. Any ideas?

Thanks
Back to top
View user's profile Send private message
mike71



Joined: 18 Jan 2005
Posts: 4

PostPosted: Tue Jan 18, 2005 5:48 pm    Post subject: Reply with quote

On a lark I recompiled the application under Delphi 7 (I had been using Delphi 2005) and the problem went away. Looks like it's a bug in the Delphi 2005 version of the components?
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Wed Jan 19, 2005 8:18 am    Post subject: Reply with quote

Thank you for your information. We've found the reason for this. There is error in sources. For all who have registered version please modify sources of procedure TTaskItem.SetFlags(const Value: TTaskFlags); as following:
the last line of procedure before end; must be:

Code:
OleCheck((FInterface as ITask).SetFlags(pdwFlags));
Back to top
View user's profile Send private message
rcastle



Joined: 10 Jun 2005
Posts: 4

PostPosted: Fri Jun 10, 2005 3:33 pm    Post subject: How about the Demo? Reply with quote

I'm using the demo version of VCL Scheduling Agent and having troubles with this issue. Has the demo code been updated?

Here's an example of my code:

Code:
procedure TForm1.Button1Click(Sender: TObject);

var
   TriggerDetails: TTriggerDetails;
   ST: TSystemTime;

begin
  TaskScheduler1.Active :=true;
  with TaskScheduler1.CreateNewItem(Format('New task %d', [GetTickCount])) do
  begin
    ApplicationName := '\\rpm_server3\rpm1\public\osver.exe';
    // create start time data
    DateTimeToSystemTime(Now, ST);
    ST.wHour := 1;
    ST.wMinute := 0;
    ST.wSecond := 0;
    ST.wMilliseconds := 0;

    SetAccountInformation('REELL\**********','**********');

    Flags := Flags - [tfRunOnlyIfLoggedOn];

    Triggers.Add;
    Triggers[0].TriggerType := ttOnce;
    Triggers[0].StartTime := SystemTimeToDateTime(ST);
    Triggers[0].BeginDate := Date+1;

    TriggerDetails.Daily.DaysInterval := 1;
    Triggers[0].Details := TriggerDetails; // trigger details must be changed only this way
    // could be used UpdateTriggers and Save
    Triggers.UpdateTriggers;
    Save;
    // or just Deactivate(True)
    //Deactivate(True);
  end;
  TaskScheduler1.Active := false;
end;


Thanks,

Randy
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Fri Jun 10, 2005 4:05 pm    Post subject: Reply with quote

Thank you for notice! Indeed due to script error this was not included. We will update demo build shortly. Registered sources are already updated.
Thank you again.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Fri Jun 10, 2005 4:46 pm    Post subject: Reply with quote

FYI: Trial version just updated as well. Thank you again!
Back to top
View user's profile Send private message
rcastle



Joined: 10 Jun 2005
Posts: 4

PostPosted: Fri Jun 10, 2005 5:27 pm    Post subject: Still having trouble Reply with quote

I downloaded the demo again and tried it. Same problem. I then removed the Delphi package and reinstalled it. Same problem. Removed the component from the canvas. Still problem. Recommendations?

By the way - that's a very fast response. If I can get this to work I'll be buying a copy.

Thanks,

Randy
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Fri Jun 10, 2005 6:17 pm    Post subject: Reply with quote

As we've received you order, I guess it works now for you?
Back to top
View user's profile Send private message
rcastle



Joined: 10 Jun 2005
Posts: 4

PostPosted: Fri Jun 10, 2005 6:45 pm    Post subject: Reply with quote

Actually, I decided $30 was worth giving it a shot even if the demo wasn't working. The file I downloaded was still dated 20 May. The real version seems to be working ok.

Randy
Back to top
View user's profile Send private message
rcastle



Joined: 10 Jun 2005
Posts: 4

PostPosted: Fri Jun 10, 2005 6:49 pm    Post subject: Reply with quote

I just checked the download site and the date has changed. I assume it would work with the demo now but I can guarantee it works with the purchased version. This VCL control is doing exactly what I needed and the support is first rate. Spend the $30!

Randy
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Sat Jun 11, 2005 5:51 am    Post subject: Reply with quote

I guess, this was either proxy or cache issue. Since right before posting to the forum the download page on web site and file itself was updated to the newer content.
Thank you for your good words.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> VCL Scheduling Agent All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group