This is a Perl job.
I need a script that can be called from cron or shell and does the following:
- Query a MySQL table to select a set of records.
- If the result is not empty, export all selected records, but just a subset of columns (defined by an array of column names that is hard-coded in the Perl script) to a single csv file (named using a static value plus the current date and time) to a local directory. In the process, convert a few field values (such as converting default date values “0000-00-00” to null values).
- If the csv file was created, connect to an external FTP server (address and login hard coded in the Perl script) using SFTP protocol [<< IMPORTANT] and upload the file to the FTP server.
- Send an email (addresses hard-coded in the Perl script) indicating outcome including date, result (success, ftp connection error, no records, etc), and number of records found in the query.
The server is Linux. Any Perl modules can be installed.
It needs to be well commented especially the query, column subset, ftp info, and email info areas (so I can edit them).
Please don’t propose/use an existing third-party script. I don’t want all the baggage of a “full-featured” script that does 20 things when all I need is the few simple things above. If you really want to use existing scripts, they must be open source and you need to package them in a way that the excess code is removed or “hidden” -- AND YOU NEED TO EXPLAIN THEM IN YOUR BID or else I’ll assume you’re using none.
12 pekerja bebas membida secara purata $58 untuk pekerjaan ini
Hi , I'd Like to pleasure you with my rich perl programming experiences since 1996. We are developer of LookMyPC, can can give you support over LookMyPC. pls check pm for more