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 

Create a hourly schedule

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



Joined: 18 Dec 2015
Posts: 1

PostPosted: Wed Mar 02, 2016 6:43 pm    Post subject: Create a hourly schedule Reply with quote

How can I create an hourly schedule with VCL Scheduling agent?

If Task Scheduler it can be creates this way:

Triggers -> Edit -> Repeat task every 1 hour for duration Indefinitely
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2103

PostPosted: Thu Mar 03, 2016 3:31 pm    Post subject: Reply with quote

If you open the Demo project, you may find there a quick demo menu item that runs custom exe every 10 minutes for 24 hours. This is the sample you need. Please check Createtasktorunevery10minutesfor24hours1Click() event code.
The only changes you would need to create hourly task are:
1. Instead of Triggers[0].Interval := 10; use Triggers[0].Interval := 60; (Means run every 60 minutes)
2. Instead of Triggers[0].Duration := 24 * 60; (means run for 24 hours) you can use Triggers[0].Duration := 24 * 60 * X; (where X is the needed amount of days)

If you need to run it indefinitely then:
When running under Windows Vista or later just don’t set anything to Duration property and this will setup it to run indefinitely. We will update the code to use 0 as value for indefinitely settings. When running under Windows earlier than Vista (if needed) just set HasEndDate property of Trigger to False.
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