I have a REST sending 2 parameters to database and want to have a timertask who shoud ask database at regular intervals.
And the problem is that TimerTask and his method run() doesnt accept any parameters so how to do this:
for example :
sending 2 Strings through TimerTask, get response from database and TimerTask ask the same query (with the same Strings at evry 2 minutes)
Throught the web it's only simple examples how to print "Hello" for regular intervals (know how to do that) but i can't any answears how to use method (who send query to database) in TimerTask