Question: I would really like to get if the file is Windows-1256 or not. Is there a way to recognize if text file is Windows-1256 in Java?

Answer: 
You could use a [`ScheduledExecutorService`, which is part of the standard JDK since 1.5](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html):

```
    ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
    Runnable r = new Runnable() {

        @Override
        public void run() {
            invokeWebService();
        }
    };

    scheduler.scheduleAtFixedRate(r, 0, 30, TimeUnit.SECONDS);

```
It is not recursive but repeated. You have two choice here:

* Use a Timer and a TimerTask with scheduleAtFixedRate
* Use Quartz with a repeated schedule.

In quartz, you can create a repeated schedule with this code:

```
TriggerBuilder.newTrigger().withSchedule(SimpleScheduleBuilder.repeatSecondlyForever(30))
                .build()

```