[HELP] Execute a daily operation

Hi all,

I would like to know according to you, what's the best method to execute a java operation daily.

I need to export a mySQL table in a txt file through JDBC every day at 00:00. Export the table it is not a problem, but I don't know how to execute the operation every day at that exact time.

Can someone help me? Thanks.

Augusto.

[368 byte] By [Augustissimoa] at [2007-11-27 4:50:26]
# 1
Use a cron job. (Assuming you're using a real operating system.)
paulcwa at 2007-7-12 10:03:47 > top of Java-index,Java Essentials,Java Programming...
# 2
> Use a cron job. (Assuming you're using a real operating system.) Oh thats right paulcw. Another d@mned passive aggressive stabat my TRS-80! Im getting sick of it. BASIC has got to be worth something. ;)
TuringPesta at 2007-7-12 10:03:47 > top of Java-index,Java Essentials,Java Programming...
# 3
I've also thought to cron... unfortunately i must run this program on Windows XP.Message was edited by: Augustissimo
Augustissimoa at 2007-7-12 10:03:47 > top of Java-index,Java Essentials,Java Programming...
# 4

XP must have some kind of corresponding functionality.But this is a Windows question, not a Java question. Maybe someone here knows but you might be better off asking on a Windows forum.

I suppose you could create a Java program that starts on host startup and which invokes some functionality at certain times, but that seems like a roundabout way of solving the problem.

paulcwa at 2007-7-12 10:03:47 > top of Java-index,Java Essentials,Java Programming...
# 5
http://www.opensymphony.com/quartz/~
yawmarka at 2007-7-12 10:03:47 > top of Java-index,Java Essentials,Java Programming...
# 6
> I've also thought to cron... unfortunately i must run> this program on Windows XP.So use the "Scheduled Tasks" application in Windows.
DrClapa at 2007-7-12 10:03:47 > top of Java-index,Java Essentials,Java Programming...
# 7

> I suppose you could create a Java program that starts on host startup and which invokes some functionality at certain times, but that seems like a roundabout way of solving the problem.

I understand... anyways I would prefer to do this in Java, if it's possible...

> http://www.opensymphony.com/quartz/

Wow, very interesting... thanks yawmark, I will try to use it.

Does someone know other ways?

Augustissimoa at 2007-7-12 10:03:47 > top of Java-index,Java Essentials,Java Programming...
# 8
What was wrong with DrClap's suggestion? It's certainly easy to do.
Hippolytea at 2007-7-12 10:03:47 > top of Java-index,Java Essentials,Java Programming...
# 9

> What was wrong with DrClap's suggestion? It's certainly easy to do.

Yes, you are right... I'm using Windows, but actually I think that I would not use cron either if I was using linux. Ii would like to solve this problem with java, to allow the program to be executed on multiple OS...

any other ideas?

Augustissimoa at 2007-7-12 10:03:47 > top of Java-index,Java Essentials,Java Programming...
# 10

> any other ideas?

http://www.opensymphony.com/quartz/

Competing Products?

There are no known competing open source projects (there are a few schedulers, but they are basically Cron replacements written in Java).

Commercially, you may want to look at the [url=http://www.fluxcorp.com/]Flux scheduler[/url].

yawmarka at 2007-7-12 10:03:47 > top of Java-index,Java Essentials,Java Programming...
# 11
Finally I've found what i was looking for... [url] http://java.sun.com/j2se/1.4.2/docs/api/java/util/Timer.html[/url]
Augustissimoa at 2007-7-12 10:03:47 > top of Java-index,Java Essentials,Java Programming...