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!

Export single table and email via cron job

Discussion in 'Database Discussion' started by LukeDouglas, May 15, 2018.

  1. LukeDouglas

    LukeDouglas Member

    Nov 22, 2010
    Likes Received:
    Trophy Points:
    How can I setup a cron job to execute a SQL query, export the results to a CSV formatted file and email to an address?
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello @LukeDouglas,

    You can add cron jobs through cPanel:

    Cron Jobs - Version 70 Documentation - cPanel Documentation

    You'll just need to setup a custom script using a programming language such as PHP or Perl that performs all of the actions you need it to (e.g. running SQL queries, exporting results to CSV). The programming portion isn't something we can provide direct assistance with, but websites such as Stackoverflow are useful if you want to seek out help with programming.

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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