Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Commit fc8b0e5 (randomization ~) breaks config file #102

Closed
Seanst3r opened this issue Jan 1, 2022 · 4 comments
Closed

Commit fc8b0e5 (randomization ~) breaks config file #102

Seanst3r opened this issue Jan 1, 2022 · 4 comments
Labels

Comments

@Seanst3r
Copy link

Seanst3r commented Jan 1, 2022

Hi. After cloning the latest git version my crontab won't install. The last commit is this one:

Add random within range '~' operator …
@opohorel opohorel committed on Nov 8, 2021

I get "bad minute", bad "hour", bad day-of-week, you name it.

01 * * * * /bin/echo Hello, world!

crontab: installing new crontab
"/tmp/crontab.ZlLH9I":73: bad minute

I reverted to the prior commit it seems back to normal.

git reset --hard 19c2e1d

@t8m
Copy link
Member

t8m commented Jan 5, 2022

Please try the current master branch (07bf4b9)

@t8m t8m added the bug label Jan 5, 2022
@Seanst3r
Copy link
Author

Seanst3r commented Jan 5, 2022

Ok, I touched my crontab and it installed ok. I can't tell you if it has interpreted it all correctly.. time will tell as my entries fire off but I would assume it will be fine.

As an aside, it's pretty cool that you folks are here maintaining this thing that's been a staple for decades. The fact that someone cared enough to create and share a new feature like this is pretty awesome. I'll be sure to put it to use.

@Seanst3r Seanst3r closed this as completed Jan 5, 2022
@Seanst3r
Copy link
Author

Seanst3r commented Mar 3, 2022

I have to reopen this issue. It seems like the parsing altered by the randomizer code is still messed up.

I wanted a job to run every 5 minutes.

*/5 * * * * whatever
crontab: installing new crontab
"/tmp/crontab.H4l8rU":77: bad minute
Invalid crontab file, can't install.

Workaround was to use a comma separated list of 0,5,10,15 etc.

I get the same thing with hours.

I also noticed that if I use /10 it hangs installing the crontab.

*/10 * * * * whatever

or lets say every 10 hours

  • */10 * * * whatever

crontab: installing new crontab
(hang)

@Seanst3r Seanst3r reopened this Mar 3, 2022
@t8m t8m closed this as completed in 299ef06 Mar 22, 2022
@t8m
Copy link
Member

t8m commented Mar 22, 2022

@Seanst3r please retest with the latest checkout.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants