code: def dispatch_job_hook(self, link, key, job_config, logfile, stream=sys.stdout):
          
          full_sub_dict = job_config.copy()
  
          full_command = "%s >& %s" % (
              link.command_template().format(**full_sub_dict), logfile)
  
          logdir = os.path.dirname(logfile)
  
          if self._dry_run:
              sys.stdout.write("%s\n" % full_command)
          else:
              try:
                  os.makedirs(logdir)
              except OSError:
                  pass
              os.system(full_command)
docs: Send a single job to be executed
  
          Parameters
          ----------
  
          link : `fermipy.jobs.chain.Link`
              The link used to invoke the command we are running
  
          key : str
              A string that identifies this particular instance of the job
  
          job_config : dict
              A dictionrary with the arguments for the job.  Used with
              the self._command_template job template
  
          logfile : str
              The logfile for this job, may be used to check for success/ failure