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.

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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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...
Loading...

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