Check if a file exists every 5 seconds in Spring?

What was the good and simple practice in Spring when you want to periodically check for a flag file in a certain directory? i.e. if there is that flag file, pause for 5 seconds and check again; If there is no flag file, then proceed to next step. I think we could use Thread.sleep or Timer, but still want to get some expert answer on any simple solution. Thanks!
heyday2004Asked:
Who is Participating?
 
ksivananthConnect With a Mentor Commented:
timer seems good option!
0
 
Sathish David Kumar NConnect With a Mentor ArchitectCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.