Marco Micheli
Marco Micheli

Reputation: 717

Java Eclipse Program Run automatically every week

I have a program written in java with Ecplise. It's a big project (it uses mysql, threads, etc) and i have run it only on my pc. Now i need to install it on Linux Server and run it automatically every week (on monday). How can i do that?

Upvotes: 0

Views: 120

Answers (2)

RendezAWS
RendezAWS

Reputation: 103

Create a jar file of the project and deploy it on linux and schedule a cron job for it.

Upvotes: 0

Angelo Fuchs
Angelo Fuchs

Reputation: 9941

add a cron job for it.

use crontab -e to edit the crontab of the user who should run it then add the line.

0 0 * * 1 yourCommand

more information here: http://linuxmoz.com/crontab-syntax-tutorial/

Be aware that cron always starts in the home directory of the user. So if you want it to change to your programs directory first, you need to write a script for that.

Upvotes: 4

Related Questions