title: How to schedule a task at go periodically?
body: <p>Is there any native library or third party support like <code>ScheduledExecutorService</code> by java native library at go lang for production use case? </p>
  
  <p>Please find the code snippet in java 1.8 :</p>
  
  <pre><code>import java.util.concurrent.Executors;
  import java.util.concurrent.ScheduledExecutorService;
  import java.util.concurrent.TimeUnit;
  
  
  public class TaskScheduler {
  
      /**
       * @param args
       */
      public static void main(String[] args) {
          Runnable runnable = ()-&gt; {
                  // task to run goes here
                  System.out.println("Hello !!");
          };
          ScheduledExecutorService service = Executors.newScheduledThreadPool(1);
          service.scheduleAtFixedRate(runnable, 0, 1, TimeUnit.SECONDS);
  
      }
  
  }
  </code></pre>
  
  <p>It will print <code>Hello !!</code> in every one second.</p>