Export single table and email via cron job

LukeDouglas

Active Member
Nov 22, 2010
34
1
58
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?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.