Comments (4)
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.
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.
I'd be fine with this if you want to submit a PR.
from cron-expression.
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)
- Class \Cron\YearField not found - Referenced in \Cron\FieldFactory HOT 1
- Not support PHP 7.1.9 HOT 4
- Can you release a 1.2.1 tag? HOT 1
- dragonmantank repository: Unclear where to submit issues HOT 1
- Inconsistent behavior with regards to timezones (2.0) HOT 2
- Composer Autoloader - Not Working (>= 1.6.0) HOT 5
- validate cron expression HOT 1
- Mark this as abandoned on packagist HOT 9
- getMultipleRunDates HOT 1
- Wrong every N-month calculate HOT 1
- Incorrect expression HOT 1
- can't read cron expressions for 6 positions HOT 1
- PSA: Tagging of the 1.2.2 branch caused issues with [insert framework or library] HOT 3
- Yii2 yii2mod/yii2-scheduling - InvalidArgumentException: 5 is not a valid position HOT 2
- abandoned package is required HOT 2
- What is this " 5 is not a valid position" HOT 2
- library incorrectly relies on the timezone set in php.ini
- Express week number
- Invalid CRON field value 30 at position 1 HOT 1
- Add static isValid function to CronExpression to allow testing of expressions prior to creation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cron-expression.