def run(self, start=1, end=None):
        """
        to start from a given job use n, e.g., 3
        or to run a range of jobs use n:n, e.g., 3:5
        or for a single job only use n:n, e.g., 2:2
        no args means all jobs in batch are run
        """
        ## some bounds checking and logics
        if not (end):
            end = self.jobcount
        if (start < 1):
            start = 1
        if (start > self.jobcount):
            start = self.jobcount
        if (end > self.jobcount):
            end = self.jobcount
        if (end <= start):
            end = start
        for i in range(start - 1, end):
            self._exec(self.jobs[i][0],
                       self.jobs[i][1],
                       self.jobs[i][2],
                       self.file)

        to start from a given job use n, e.g., 3
        or to run a range of jobs use n:n, e.g., 3:5
        or for a single job only use n:n, e.g., 2:2
        no args means all jobs in batch are run
        
recipes/Python/496897_Running_Batch_Commands/recipe-496897.py