Skip to content

Ability to skip a job #319

Open
Open
@chino540off

Description

@chino540off

Hi,

I'm creating a pool of tasks which can be run or not (depending on the weather).
I would like to skip a particular run of a job without lost history of previous run.

I was thinking to do it like that.

def func():
  # this time, the job should not be done,
  # but must stay in the schedule queue for next time
  # This must keep last_time property unchanged,
  # and update next_time property
  if something():
    return schedule.SkipJob

  # normal running
  do_something_else()

schedule.every().day.do(func)

What do you think?

Cheers,

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions