Evertjan.
10/5/2014 7:28:00 AM
PeCoNe <maljers@telfort.nl> wrote on 05 okt 2014 in comp.lang.javascript:
> i need to write a script which starts on 09:00 and stops on 17:40:00.
> What is the best way to do this?
0 [we programmers, like babies, start at zero]
I doubt you "need" to do that, perhaps you want to do that.
[Unless you were ordered to do that as school homework, in which case
we should not do it for you?]
1
The nonsense of asking for "the best". There is only such in one's private
opinion. Even the visual-appealing-ness of the source script could be part
of such assessment.
2
You cannot write a script that starts to be executed on a certain time by
the content of such script, as the script has to start before it knows what
time it is. Script execution has to be started by some form of external
action.
3
What do you really mean by a script that "stops"? A script is a peace of
text used as a sourcecode for/by an interpreting engine. Do you mean "stops
executing"?
4
Are you asking for a javascript script in a html-file in a browser?
That would be stretching it, because modern browsers will time out any
javascript script long before, within minutes. If not in a browser, please
state the platform.
Heb je ook een naam?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)