Link to home
Start Free TrialLog in
Avatar of Richard Teasdale
Richard TeasdaleFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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!
SOLUTION
Avatar of Kimputer
Kimputer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Richard Teasdale

ASKER

Thank you both for your advice, especially Kimputer for knocking up a quick script!
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.
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!