Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Execute a js function every 10 seconds.

    I didn't post at Javascript's forum, because i need a Server-Side solution.
    So, i have a js function which reads a file. I need it to be executed every 10 seconds of the server. Why do i need this ?
    I have to make a trivia chat. I have a bot in a php file, and i need the file to be read every 10 seconds of the server. I already have that function
    Why 10 seconds of the server ?
    Because, let's say there are 2 people on the chat. The file should be read at the same time for they both. So, if the first one enters now, and another one enters over 3 seconds, the function should be executed at the same time.
    So, it doesn't work with javascript, with setTimeout/Interval, because the function will run for both on different times.
    If it can't be done with that function, i can put that function in another file. So i need that file to be read every 10 seconds of the server...
    Somebody gave me that php code, to see how many seconds remained until the 10 seconds interval ends ( <?php echo ceil(time()%10); ?> ). Can i use it ?
    Please help. I can help the guy who helped me with 5-7 euros/$ on paypal. I didn't fin any bidder on vWorker

  • #2
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't need it anymore.
    I left the project...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •