GithubHelp home page GithubHelp logo

Comments (4)

mtdowling avatar mtdowling commented on May 21, 2024

According to the wikipedia article, the hash only allows numbers between 1-5: http://en.wikipedia.org/wiki/Cron#Special_characters. Do other implementations differ from that?

Also, I noticed that the test-line "0 0 0 ? 1/2 FRI#2 *" from your blog doesn't work, probably there's an extra 0.

Thanks, I get that updated.

from cron-expression.

sebknzl avatar sebknzl commented on May 21, 2024

I can't really find an implementation supporting this hash-thing. Any discussion mentioning it seems to reference the Wikipedia-article (e.g. http://serverfault.com/questions/395262/weekly-alternating-cronjob-with-step-values)
Normal cron wouldn't support that, as hashes start comments.
It's useful nevertheless, but I don't see why it should support only Mon through Fri?
For normal cron, stuff like e.g. "0 0 1-7 * 0" would be used instead of SUN#1.

from cron-expression.

mtdowling avatar mtdowling commented on May 21, 2024

I'd be fine with this if you want to submit a PR.

from cron-expression.

gorhill avatar gorhill commented on May 21, 2024

Normal cron wouldn't support that, as hashes start comments.

Only if the hash sign is preceded by blank characters.

"0 0 1-7 * 0" would be used instead of SUN#1

That doesn't work: the day-of-month and day-of-week fields are ORed, not ANDed together. So the above would result in the event being triggered for each day between the first and seventh day of the month and for every sunday.

from cron-expression.

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.