Comments (4)
The only thing that makes sense to me is to implement different validation rulesets which can be configured by the user. But this is quite some effort, I guess.
That would be the best solution
from crontab-validator.
Hi @tomsommer, thanks for the issue.
Your expression literally means: "At every 10th minute from 2 through 59."
Or from a more technical perspective: for( i = 2, i <= 59, i = i+10 )
Why should it not be valid? Can you elaborate?
from crontab-validator.
crontab: installing new crontab
"/tmp/crontab.wsvoz6":10: bad minute
errors in crontab file, can't install.
https://crontab.guru/#2/10_*_*_*_*
"Non standard! May not work with every cron."
from crontab-validator.
OK, I see.
Looking at ...
- https://en.wikipedia.org/wiki/Cron#CRON_expression
- https://www.freebsd.org/cgi/man.cgi?crontab%285%29
- https://linux.die.net/man/5/crontab
... there is no hint, that this is invalid for crontab.
https://en.wikipedia.org/wiki/Cron#CRON_expression even states:
Slash (/)
In vixie-cron, slashes can be combined with ranges to specify step values.[4] For example, */5 in the minutes field indicates every 5 minutes (see note below about frequencies). It is shorthand for the more verbose POSIX form 5,10,15,20,25,30,35,40,45,50,55,00. POSIX does not define a use for slashes; its rationale (commenting on a BSD extension) notes that the definition is based on System V format but does not exclude the possibility of extensions.[3]Note that frequencies in general cannot be expressed; only step values which evenly divide their range express accurate frequencies (for minutes and seconds, that's /2, /3, /4, /5, /6, /10, /12, /15, /20 and /30 because 60 is evenly divisible by those numbers; for hours, that's /2, /3, /4, /6, /8 and /12); all other possible "steps" and all other fields yield inconsistent "short" periods at the end of the time-unit before it "resets" to the next minute, second, or day; for example, entering */5 for the day field sometimes executes after 1, 2, or 3 days, depending on the month and leap year; this is because cron is stateless (it does not remember the time of the last execution nor count the difference between it and now, required for accurate frequency counting—instead, cron is a mere pattern-matcher).
I tested 2/10 * * * * echo "Hello"
on my machine (MacOS with Vixie Cron) and was able to install the cron.
I also tested 2/10 * * * * echo "Hello"
on my server (Debian Buster with Vixie Cron) and was NOT able to install the cron. (Same error message as you reported.)
The only thing that makes sense to me is to implement different validation rulesets which can be configured by the user. But this is quite some effort, I guess.
Any thoughts?
from crontab-validator.
Related Issues (2)
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 crontab-validator.