Giter Club home page Giter Club logo

Comments (7)

bdistin avatar bdistin commented on July 4, 2024

I know I won't add support for @reboot or ?. They don't really work in our paradigm.

@annually will take 2 seconds to add. And using Math.random() H could be added very easily.

But L, W, and # are all going to take a significant amount of code and thought. I personally would like L and #, I am not sure about W though. These wildcards may not be added before the 1.0.0 release.

from klasa.

kyranet avatar kyranet commented on July 4, 2024

For ? we can use minute, hour, day, month, weekly methods from Date depending on the position of the wildcard. Should be easy to implement though.

Yes, we already discussed about @reboot not being to be implemented, that's why I didn't include it in the description.

from klasa.

bdistin avatar bdistin commented on July 4, 2024

? would only work on the moment the cron is generated; not consistent with the reboot time (each other). If that's ok, i could add that easily too... But this structure should be independent. So no client, or passing in the client start time.

from klasa.

kyranet avatar kyranet commented on July 4, 2024

You always have access to new Date() or Date.now() which return the current date or timestamp respectively. And we also do some wildcard changes, for example the pattern '0 0 * * mon,fri' gets stored as '0 0 * * 1,5' (as Sunday is 0), we can make this process and turn '? ? * * *' into '8 15 * * *' (it's 15:08 (UTC) right now), then, store the cron as that pattern instead of keeping the ?s.

from klasa.

PierreAndreis avatar PierreAndreis commented on July 4, 2024

We could also use the same approach taken in https://github.com/bunkat/later

parse('every friday at 5pm')
parse('every 5 minutes')

from klasa.

tech6hutch avatar tech6hutch commented on July 4, 2024

That's certainly more understandable, for people who don't know Cron. The current system uses Cron notation, however.

from klasa.

bdistin avatar bdistin commented on July 4, 2024

No plans to add this for the foreseeable future unless someone wants to take this up. Closing this issue for now.

from klasa.

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.