java - Run a jar automatically -


i running automatic tests , after each test, sessions of these tests automatically inserted temporary table. tool (in jar), checks temporary table , when finds new session inserted, tool scans , delete entry temporary table.

actually can manually without problem (telling tool check temporary table, if there new, scan it…), want automatically, mean tool running, , checks automatically (for example every hour) if there new in temporary table.

could me how can ? guess need server execute tool 24/24, type of server? thank much

if on unix based system, run jar cronjob. following run jar every 30 seconds.

*/30 * * * * java -jar /path/to/jar/myjar.jar 

read following learn how setup cronjob correctly https://askubuntu.com/questions/2368/how-do-i-set-up-a-cron-job

for windows, use task scheduler. https://stackoverflow.com/a/26932169/802061 suggested @kevin-esche in comments


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -