The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL Table Auto Delete Function

Discussion in 'General Discussion' started by ddeans, Nov 10, 2007.

  1. ddeans

    ddeans Well-Known Member

    Joined:
    Feb 13, 2004
    Messages:
    296
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Maryland
    I just have a question that I am hoping that someone can help with, I am sure that it is easy to do, but I can't figure it out.

    I have a MySQL database that runs a queue on my server that queues users for tarring of files, however if the current user closes their browser then their space in the database is never deleted and they always stay as current and the queue gets longer and longer.

    The table is setup with one field that contains the users in queue, it is called "id"

    In it when a user is added there are three colums that contain their information; ID, status and time.

    When status is current, it is creating that users tar file, but I want to set a cron of some type delete that entry if it is there longer than 5 minutes.... But I just don't know the command that I would type in.. Can anyone help me out?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If this script is going to be run by an individual cPanel user account, you can use the "standard" method for entering a cron job and thus avoid the need for knowing the command line parameters for cron.
     
Loading...

Share This Page