forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Taskicon to run program at a certain time

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
kenmcn816
Newbie


Joined: 26 Mar 2003
Posts: 6

PostPosted: Sun Aug 24, 2003 12:31 am    Post subject: Taskicon to run program at a certain time Reply with quote

I have VDS 4 and have modified the taskicon script included in the examples folder. I can run the program correctly by right mouse clicking the icon and running it manually. But what I would really like to do would be to run a program at a certain time of day every day. I've tried writing in the loop to check for the time of day using the @DATETIME(t) event which does return the time format I need, however I can't seem to get everything to work correctly.

Any help would be great, thanks.
kenmcn816
Back to top
View user's profile Send private message
Protected
Valued Contributor
Valued Contributor


Joined: 02 Jan 2001
Posts: 228
Location: Portugal

PostPosted: Sun Aug 24, 2003 12:35 am    Post subject: Reply with quote

I don't think I can help you, unless you show us your script Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Sun Aug 24, 2003 4:04 am    Post subject: Reply with quote

Looks like you have made some small mistake somewhere. You may consider posting the evloop and the timer event below so that some one can help you.
( I hope you have done something like this pseudocode below):

Pseudocode:
Code:
:EVLOOP
WAIT EVENT,0.1
GOTO @EVENT()

:TIMER
REM CHECK TIME
REM IF THE TIME MATCHES YOUR REQUIREMENTS
REM RUN somename.exe
REM ELSE
REM END
REM
REM REMOVE REM AND FILL VALID COMMNADS
GOTO EVLOOP

Hope this helps

Regrads

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Mon Aug 25, 2003 4:35 pm    Post subject: Reply with quote

I would use an alarm timer to accomplish this...
Code:
REM  ***  set the time you want the event to happen and start the timer...
%%time = 17:00:00
TIMER START,1,ALARM,%%time

:evloop
WAIT EVENT
GOTO @EVENT()

:TIMER1ALARM
REM  ***  put the code you want to execute when the timer goes off here...
INFO "Time to go home!"
REM  ***  restart the timer to have it go off again the next day...
TIMER START,1,ALARM,%%time
GOTO evloop

_________________
"ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player...
Back to top
View user's profile Send private message Send e-mail
kenmcn816
Newbie


Joined: 26 Mar 2003
Posts: 6

PostPosted: Tue Aug 26, 2003 3:49 pm    Post subject: Reply with quote

Thank you Hortalonus, your suggestion worked perfectly. For some reason I was thinking function when I should have been thinking command. I tried it last night and this morning and both times functioned without fail.

Thanks again for all of your help.
kenmcn816
Back to top
View user's profile Send private message
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Tue Aug 26, 2003 3:56 pm    Post subject: Reply with quote

I'm glad to help... it just so happened that I needed the same kind of thing a few weeks ago and that was the simplest way to do it.
_________________
"ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player...
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help 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
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group