Activity Stream
48,167 MEMBERS
61000 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 8 of 8
  1.     
    #1
    Member

    Default [PHP] Add Time Limit

    Hey guys , is there any way to add a time limit to a script :

    e.g : 30 minutes & if the script still hasn't completed , it stops it .

    There this function but don't know how it really works :

    set_time_limit ();





    viruz99 Reviewed by viruz99 on . [PHP] Add Time Limit Hey guys , is there any way to add a time limit to a script : e.g : 30 minutes & if the script still hasn't completed , it stops it . There this function but don't know how it really works : set_time_limit (); Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    Elite.SO Defendos.com Motionite.com
    PHP Code: 
    <?php
    // Set time limit before your code.
    set_time_limit(1800); 
    // Your code below...
    ?>
    Set the time limit to 1800s/30min seconds.

    Defendos BETA3 Released! Thread - Official Website

  4.     
    #3
    Member
    Website's:
    HD-Streaming.org
    make set_time_limit (0)
    for unlimited time execution

  5.     
    #4
    Member
    I'm guessing after the time limit is over , it will immediately stops the script how it is. Is there any way for it to process certain functions before that ?






  6.     
    #5
    Member
    Website's:
    Elite.SO Defendos.com Motionite.com
    What are you coding exactly?

    Defendos BETA3 Released! Thread - Official Website

  7.     
    #6
    Member
    Sort of an automated download script - when it stops the script due to the time limit , i need to make it run a function to delete the files .

    Maybe something like this :

    set_time =1 ; ( kind of starts a counter when the script starts )

    If $set_time = (3600) // ( when the script reaches 3600 sec , it does the following )

    {
    function to delete file
    Stop command
    ]






  8.     
    #7
    Member
    Website's:
    Elite.SO Defendos.com Motionite.com
    Why not setting the time limit to 0/unlimited?

    Defendos BETA3 Released! Thread - Official Website

  9.     
    #8
    Member
    For an unknown reason , sometimes the scripts keep running for days like its stuck






Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Long time lurker, first time poster
    By Opie in forum Introductions
    Replies: 1
    Last Post: 27th Sep 2012, 06:53 PM
  2. [Buying] Bypass PutLocker/SockShare Watch Time Limit Script
    By ChaoscripT in forum Marketplace (Buy, Sell and Trade)
    Replies: 1
    Last Post: 7th Sep 2012, 10:16 AM
  3. Replies: 9
    Last Post: 3rd Aug 2011, 02:13 PM
  4. NameCheap Domain Renwals - Time Limit ?
    By nEw_boY in forum General Discussion
    Replies: 3
    Last Post: 8th Jun 2011, 04:35 AM
  5. SQL error i get from time to time
    By Raven Faust in forum vBulletin
    Replies: 11
    Last Post: 27th Aug 2009, 07:54 PM

Tags for this Thread

BE SOCIAL