title: Firebase Jobdispatcher: Jobs that run endlessly due to an error are never scheduled again
body: <p>What happens to a recurring job that is not finished due to a crash or Android process cleaning?
  In my opinion, it is not possible to reschedule it. It will never be executed again.</p>
  <p><strong>Example</strong></p>
  <pre><code>public class MyJobService extends JobService {
  
  
      @Override
      public boolean onStartJob(JobParameters job) {
      
          doSomeWork(job);
  
          return true; // true = there is still work going on!
      }
  
      private void doSomeWork(final JobParameters job) {
  
          new Thread() {
  
              public void run() {
              
                  // do some work, maybe load data from internet
                  // loading...
                  // loading...
                  // app crashes or its process is killed by Android
                  
                  // this piece of code is never reached!
                  jobFinished(job, false);
              
              }
          }.start();
      
      }
      
  }
  </code></pre>
  <p>As you can see in the code, the job can never be terminated by the crash. It will not be rescheduled afterwards.</p>
  <p>If you want to reschedule it with <code>FirebaseJobDispatcher.mustSchedule()</code>, this appears in logcat:</p>
  <blockquote>
  <p>E/FJD. ExternalReceiver: Received execution request for already running job</p>
  <p>W/FJD. JobService: Job with tag = ... was already running</p>
  </blockquote>
  <p>even if you run <code>FirebaseJobDispatcher.cancel()</code> before.</p>
  <p>Any suggestions?</p>