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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Export single table and email via cron job

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

Tags:
  1. LukeDouglas

    LukeDouglas Member

    Joined:
    Nov 22, 2010
    Messages:
    23
    Likes Received:
    1
    Trophy Points:
    53
    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

    Joined:
    Apr 11, 2011
    Messages:
    43,293
    Likes Received:
    1,764
    Trophy Points:
    363
    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.
     
Loading...

Share This Page