Run a JS for 15 minutes every hour!

Luisfm

Newbie
Joined
Aug 10, 2012
Messages
19
Reaction score
4
Hi :)

i need some help to do a little thing her! imagine that i have 5 javascript files and i every hour i wold run 1 script for 15 minutes.
the selection of the script should be random...

how can i do that? :D
 
url.jpg
 
Why not set up some sort of cron job to run every 15 minutes that times out after 15 minutes and randomly select a JS file to run? Sounds like exactly what you need.
 
If you use unix/linux you can schedule tasks via cron jobs:
Code:
http://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/
 
There are some free web based cron job sites out there too, just do a search. Create a url that randomly selects the JS file (or pages with the JS) to pick one at random.
 
ok thanks guys :)

Will try to do it with cron job
 
hello as it's been said you can use cron if you are under linux or use cronw if you are using windows
 
Back
Top