Answer the question
In order to leave comments, you need to log in
How to run java app with cron?
Good afternoon, colleagues!
I wrote a small parser that parses data through jsoup, and then exports it to a WP site through the REST API.
This script needs to be run by cron. This begs the question - what is the best way to implement this?
1) The first option - jar'nick lies somewhere on the server and cron runs it periodically. Those. a separate job is created for CRON
2) The second option is to use libraries for Schedule (for example, Wisp )
But then the question arises ... it turns out that the application must run in the background in order for the code for the CRON daemon to work? What then needs to be done? Make a loop while(true){}
to keep the application from terminating. And create an init.d service that will launch the application each time the system is restarted?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question