1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Run a JS for 15 minutes every hour!

Discussion in 'General Scripting Chat' started by Luisfm, Apr 29, 2013.

  1. Luisfm

    Luisfm Newbie

    Joined:
    Aug 10, 2012
    Messages:
    16
    Likes Received:
    3
    Gender:
    Male
    Location:
    Portugal
    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
     
  2. SmoothBlackHat

    SmoothBlackHat Jr. VIP Jr. VIP Premium Member

    Joined:
    Feb 13, 2012
    Messages:
    189
    Likes Received:
    105
    url.jpg
     
  3. jjjrmy

    jjjrmy BANNED BANNED

    Joined:
    Dec 12, 2011
    Messages:
    123
    Likes Received:
    92
    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.
     
    • Thanks Thanks x 1
  4. MrBlue

    MrBlue Senior Member

    Joined:
    Dec 18, 2009
    Messages:
    950
    Likes Received:
    662
    Occupation:
    Web/Bot Developer
    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/
     
  5. somebodysomewhere

    somebodysomewhere Junior Member

    Joined:
    Feb 24, 2008
    Messages:
    171
    Likes Received:
    66
    Location:
    USA
    Home Page:
    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.
     
  6. Luisfm

    Luisfm Newbie

    Joined:
    Aug 10, 2012
    Messages:
    16
    Likes Received:
    3
    Gender:
    Male
    Location:
    Portugal
    ok thanks guys :)

    Will try to do it with cron job
     
  7. seo-limited

    seo-limited Registered Member

    Joined:
    Aug 23, 2012
    Messages:
    83
    Likes Received:
    2
    hello as it's been said you can use cron if you are under linux or use cronw if you are using windows