scheduling a task in linux

Hi: My problem is that I want to append data from a dbf file to a mysql table automatically every night.
My question is twofold, of course - how to append and how to schedule -  but one at a time I think!
The question is this:
what would the experts propose to be the program best suited for running on a schedule?
I am looking at Ruby, but would also consider Java, python, or anything else. I guess I will wrap a SQL command into the program which will be executable from a  cron?
Before I start down one path I would like to know that whatever I use can be scheduled to run on a debian server nightly. And a little pointer as to how best to achieve that would be most beneficial!
Sorry to be so general but thanks anyway!
Richard TeasdaleFinancial ControllerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Personally, I think the php/mysql path would be the fastest way (although I can't be sure if DBF file import is supported). The support for it is the biggest, and you can put the command line easily in cron (/path/to/php -f filethatimports.php)
Dan CraciunIT ConsultantCommented:
You can use dbf2mysql:
apt-get install dbf2mysql

Then create a shell script that imports/appends your data, test it, then schedule it to run whenever you want.

Something like
dbf2mysql -vv -U root -P yourpass -d yourdb -t yourtable -o field1, field2, ..., fieldn yourfile.dbf

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Richard TeasdaleFinancial ControllerAuthor Commented:
Thank you both for your advice, especially Kimputer for knocking up a quick script!
Richard TeasdaleFinancial ControllerAuthor Commented:
Thank you very much, Kimputer. I had looked at PHP but apparently PHP 5.3 and higher needs some tweaking for dbfs; which I completely failed to do!. I have no problem exporting the dbf from foxpro as a csv or similar, so the issue becomes slightly less. Will look at PHP again as I now understand that a cron is no problem. And thanks to Dan. I thought db f2mysql would not run unattended but will revisit.
Richard TeasdaleFinancial ControllerAuthor Commented:
Apologies to Dan; I had not realised that dbf2mysql was a class, not a standalone program.
And a note to other users - the excellent navicat software (which is not free but manages databases very well) has a scheduler!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.