• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

how to set task schedule for importing text file in Mysql table?

sweetman

Basic Pleskian
Hi all,
I'm currently using Navicat on Windows 7 to schedule a task that imports a text into a specific subscription > Mysql table on my plesk server (11.0.9) at specific hour of the day. It works perfectly.
But it runs on windows on my locale machine, so I need to leave the machine up and running all days.
I would like to re-create this schedule directly on the plesk server.

How can I create this schedule on plesk 11.0.9? I've seen there is Task schedule page on plesk 11.0.9 but how can I find the right command?
Just to explain it a little better:
Imagine you have text file uploaded to an FTP address every day at a specific hour.
Every day you need to import this text in a table, replacing completely the table content at the same time (basically the table is emptied and then re-filled with the imported data from the text file).

Is there some documentation that allow me to do this?
Or is there someone that can point me in the right direction?
TIA

tony
 
You need to read mysql documentation about importing data from file to database.
In common way it should be something like this:

# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa < /path/to/file

But note that format of file is very important here!
 
Hi Igor,
thanks for your reply.
I can't use the command line option since I'm on plesk 11 as a reseller.
I should use the schedule options provided by plesk, but I don't know what to put in the command field, in the schedule task setup.
Is there a basic example I can use as a starting point? I can't find anything useful in the plesk help.

TIA
tony
 
Actually you can't use any sql import commands if your have no root or admin privileges.
And it is very bad idea to import something to plesk psa database from untrusted source. Consequences may be unpredictable.
 
Hi Igor,
I need to import a text file in mysql every day. A software house has created an export script that will ftp a file at a specific hour on my server.
I need to import this text file in mysql every day.
Actually I do this using Navicat Premium on my local workstation (windows 7).
This works ok, but I need to do this directly on the server.
Is there an alternative?
TIA
tony
 
Back
Top