Sometimes it happens that a job is stuck in waiting-state, because it tried to run it but there was missing some necessary values.

Even if you add the needed values after, it will still not run it before you have made a re-run.


Below is a javascript named "Over and Over Again", that automatically will try to re-run all jobs that are in a waiting-state.


fileId = job.getData('sourceFileId');
job.log('sourceFileId='+fileId);
hash = api.path('storage/file/'+fileId).get().hash;
if (!hash) {
  job.log('file '+fileId+' is missing hash value');
  job.wait('file '+fileId+' is missing hash value');
}