Giter VIP home page Giter VIP logo

Comments (5)

agronholm avatar agronholm commented on May 31, 2024

Original comment by Alex Grönholm (Bitbucket: agronholm, GitHub: agronholm):


I think that the documentation improvements made for 2.1.0 should cover this.

from apscheduler.

agronholm avatar agronholm commented on May 31, 2024

Original comment by Dariusz Suchojad (Bitbucket: dsuch, GitHub: dsuch):


Thanks, that did the trick.

from apscheduler.

agronholm avatar agronholm commented on May 31, 2024

Original comment by Alex Grönholm (Bitbucket: agronholm, GitHub: agronholm):


You misunderstand. Just pass max_runs= to add_interval_job() or whatever. The job adding functions pass along all keyword arguments to Job.

from apscheduler.

agronholm avatar agronholm commented on May 31, 2024

Original comment by Dariusz Suchojad (Bitbucket: dsuch, GitHub: dsuch):


OK, but the apscheduler.job.Job's docs say "Job instances are created by the scheduler when adding jobs, and it should not be directly instantiated." and I haven't ever had a need to use this class directly before.

Could either the 'max_runs' parameter be added to Scheduler.add_interval_job and Scheduler.add_cron_job or the docstring updated so that users don't get an impression they shouldn't be tinkering with this class themselves?

On a related note, how does 'max_runs' influence one-time jobs? I mean, how can a job be both of a one-time type and have 'max_runs' provided? I'm asking because the changelog says the parameter is to do with all the jobs, not only interval-based and cron-style ones.

from apscheduler.

agronholm avatar agronholm commented on May 31, 2024

Original comment by Alex Grönholm (Bitbucket: agronholm, GitHub: agronholm):


http://readthedocs.org/docs/apscheduler/en/latest/modules/job.html#apscheduler.job.Job

You can pass these as keyword arguments when adding a job. Perhaps I should point this out more clearly in the docs.

from apscheduler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.