sql server - How to execute a Java task on a scheduled basis, and on demand? -


my task dump large mssql table csv file uploaded elsewhere. task needs run nightly (or on scheduled basis), , should executable on demand (from web page). csv conversion must done in java.

this i've never implemented, seems common need. google research, came 2 options. have no idea if these have obvious pitfalls, or if there obvious (and superior) implementation options unaware of. use informed feedback/advice on how approach this.

  1. execute java application in web services container, apache tomcat. application run , it's business logic on whatever schedule, , tomcat make accessible web page. seems overkill, setup , maintain tomcat installation.

  2. package java program jar, , setup jenkins job (i have access jenkins server installation) execute main class on whatever schedule. , create jenkins jobs (in php or something) needed on demand executions. seems clean , easy option, there obvious pitfalls i'm missing?

there many tools job, no idea how pick right one.

also, general advice on how convert table csv in memory safe , time efficient manner appreciated.

the common way handling running job on schedule cron.

as accessing via webpage perhaps operated webservice, using somekind of rest or soap api. webservice run java logic , deliver csv either response or generate on file system on server.

as dumping data - should possible export csv mysql directly: dump mysql database plaintext (csv) backup command line

if there no requirement in java suggest simple webpage submit button calling mysqldump command. php script wrapper system call run mysqldump csv , dump location on http server.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -