java - Execute code when system time reaches a specific time -


this question has answer here:

how can implement code when specific system time reached? solution have thought of using timer "tick" every few minutes or hours check if specific time has been reached.

are there other better solutions ?

thanks.

sorry if had not been clear, implementing code inside java program, clear records of log before new day coming , save records.

example: clear current records , save these records @ 23:59.

in pure java, there timer class. useful if have program running already. or running web app up.

another alternative use operating system (unix cron) , have start java program @ time. useful if don't meet conditions timer.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -