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 


have program wait a month?

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


Joined: 01 May 2003
Posts: 61

PostPosted: Wed Jan 02, 2008 9:01 pm    Post subject: have program wait a month? Reply with quote

hi guys,
say what is the best way to have a program wait for
30 days and then to do its job and then wait untill the end on the next month and repeat?

oh yeah its with vds4

thanks

_________________
most computer errors happen between the keyboard and the chair
Back to top
View user's profile Send private message
trapper
Contributor
Contributor


Joined: 28 Jan 2005
Posts: 112
Location: Brisbane, Australia

PostPosted: Wed Jan 02, 2008 9:14 pm    Post subject: Reply with quote

Use Windows Scheduler to run the program when required.
_________________
John Trappett
Back to top
View user's profile Send private message
harry
Contributor
Contributor


Joined: 01 May 2003
Posts: 61

PostPosted: Wed Jan 02, 2008 11:24 pm    Post subject: Reply with quote

any other route???
_________________
most computer errors happen between the keyboard and the chair
Back to top
View user's profile Send private message
trapper
Contributor
Contributor


Joined: 28 Jan 2005
Posts: 112
Location: Brisbane, Australia

PostPosted: Wed Jan 02, 2008 11:52 pm    Post subject: Reply with quote

harry wrote:
any other route???

You could do it within the program itself... but why would you want to have a program sitting idling each month only to do something at the end of the month? It seems to me that this is the sort of thing that the Windows Scheduler is perfectly suited to.

_________________
John Trappett
Back to top
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1565

PostPosted: Thu Jan 03, 2008 12:04 am    Post subject: Reply with quote

If it's being run on a server than waiting 30 days may be okay, but if it's on a client/user machine it's likely it will be rebooted several times between that time.

Have your application run on Windows startup. You should write a date to the registry and have your application check if it is past this date, if so then execute the applications code; otherwise have it close the application so it doesn't use up system resources unnecessarily.

The windows scheduler is the best idea since you don't have to execute the application until it is exactly at a certain date/time - however if the date/time passes and the computer was not on then the scheduler won't execute - using the windows startup method noted above will be better in this case.
Back to top
View user's profile Send private message
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