Giter VIP home page Giter VIP logo

ontime's People

Contributors

dependabot[bot] avatar mycoboco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ariyo

ontime's Issues

Specific time is not working

hi @mycoboco,

I have an issue while using cycle at specific time.
It is working at "10:18:20" but its not working at "2018-01-05T10:18:20" and "2018-01-05 10:18:20" .

Do you have any idea about it?

jobs between times

I didn't see a way of doing this but having jobs start between certain times would be nice. For example, I have sensors where I collect data every minute or so during the day time and every 5 minutes or more during the night. Therefore if a time is greater than 07:30 then very 1 minute, if time is greater than 20:00 then every 5 minutes. Thanks, like your OT.

Incorrect run of job when single set to true

Given this code

ontime({
    cycle: [ '0', '5', '10', '15', '20', '25', '30', '35', '40', '45', '50', '55' ],
    single: true,
    log: true
}, function (ot) {
    // ...
    ot.done()
})

ontime failed to correctly run the job for 30 and, sometimes, 0.

No problem with single set to false.

Weekdays

Hi,
Thanks for this, it works great and saves a lot of time.

Is there a way to specify weekdays only and omit weekends?
Or should I just add every day of the week to the array?

I'd like a job that runs every 5 minutes from 7am-9am Mon-Fri.

error using cancel()

I would like to terminate or cancel an instant of an onTime so that I could programmically restart it using a different setting. Therefore, I tried using ot.cancel(); I assumed that is what this is for but was unsure.

As a test, I was using the ontime module to trigger every minute and when the minute >= ## then I called ot.cancel().
if(myMin >= 50) ot.cancel();

When I tried using this, I get the following error
/home/web/node_modules/ontime/index.js:209
cancelTimeout(then.timer)
ReferenceError: cancelTimeout is not defined

Ideally, I would like to kill an instance of onTime using the id and use it anywhere in the code with just ot.cancel(id);

Thanks for your help.

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.