'Deletes scheduled jobs marked with the given tag, or all jobs
if tag is omitted.
:param tag: An identifier used to identify a subset of
jobs to delete'

def clear(self, tag=None):

    if (tag is None):
        del self.jobs[:]
    else:
        self.jobs[:] = (job for job in self.jobs if (tag not in job.tags))
