title: How to achive multiprocessing with time constraint in python
body: <p>I have two functions that need to be run parallel using scheduler. I implemented with multiprocessing but one process blocks other process. How to achieve such functionality where lets say one function runs every 5 minutes and performs some task while other functions also performs some task every 2 minutes? Here both functions are different.</p>
  <p>I have used scheduler to run both functions. But it blocks other function until its finished.</p>
  <p>For example:</p>
  <pre><code>    def count1():
           now = datetime.now()
           start_time = now.strftime(&quot;%H:%M:%S&quot;)
           time.sleep(5)
           datetime.now()
           end_time = now.strftime(&quot;%H:%M:%S&quot;)
  
      def count2():
           now = datetime.now()
           start_time = now.strftime(&quot;%H:%M:%S&quot;)
           time.sleep(5)
           datetime.now()
           end_time = now.strftime(&quot;%H:%M:%S&quot;)
  
      if __name__ == '__main__':
          schedule.every(5).seconds.do(count1)
          schedule.every(15).seconds.do(count2)
          while True:
              # Checks whether a scheduled task
              # is pending to run or not
              schedule.run_pending()
              time.sleep(1)
  </code></pre>
  <p>I want to run both functions parallel without blocking each other. How do I achieve this?</p>