I have folders which contain xml files. The content of folders is updated (inserted new xml files) as N files per day. I would like to write java program which will get the newest files from folders and do some operations with these files. I have two ways of doing this:
Run java application every t minutes with cronjob.
or
Multithreaded java application which is run as daemon.
Which will be more efficient? Or any ideas, which can help.
Application should run on Linux.
Even if you decided not to go the cron route, your Java application probably wouldn't need to be multithreaded, unless you ended up building a Quartz-like scheduler from scratch (which would probably be overkill).
I recommend going with the cron approach for several reasons:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With