ajdicky Posted April 2, 2008 Posted April 2, 2008 I needa know how to make my script run every hour, could i make in run randomly once in every hour? like it would only run once in a hour but different minutes as the last hour... could i use anything inside the Date Management to do so?or do I have to use the sleep() command? thanks:)
Laslie Posted April 2, 2008 Posted April 2, 2008 I needa know how to make my script run every hour, could i make in run randomly once in every hour?like it would only run once in a hour but different minutes as the last hour...could i use anything inside the Date Management to do so?or do I have to use the sleep() command?thanks:)Use Windows Schedule Task.
ajdicky Posted April 2, 2008 Author Posted April 2, 2008 Use Windows Schedule Task.>.< can't find it!help?
d4rk Posted April 2, 2008 Posted April 2, 2008 $min=@MIN $sec=@SEC while $min="00" and $sec="00" ;your script here wend [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys
covaks Posted April 2, 2008 Posted April 2, 2008 What do you mean you can't find it? What OS are you using? Start > All Programs > Accessories > System Tools > Scheduled tasks.... If you want to do it within your script though, something like this might work: While 1 $Minute = Random(1,59,1) Do Sleep(1000) Until @Min = $Minute ; do whatever ; Since we want it to run randomly once an hour, we need to calculate how much time is left before the hour is up, and sleep that length of time. $s = ((60 - $Minute) * 60) * 1000 Sleep($s) WEnd
ajdicky Posted April 2, 2008 Author Posted April 2, 2008 hmm thx both of you i'll have to learn about it=\
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now