Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

MySQL Table Auto Delete Function

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

  1. ddeans

    ddeans Well-Known Member

    Feb 13, 2004
    Likes Received:
    Trophy Points:
    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

    Nov 29, 2006
    Likes Received:
    Trophy Points:
    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.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice