Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

day (week) cron job column is non-standard #87

Open
th0mcat opened this issue Jul 27, 2021 · 5 comments
Open

day (week) cron job column is non-standard #87

th0mcat opened this issue Jul 27, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@th0mcat
Copy link
Contributor

th0mcat commented Jul 27, 2021

When using a cron job that declares a value in the day (week) column (!remindme cron 13 8,10,12,14,16 * * 1-5; Get up, take a break, get some water), 1-5 reflects Tuesday-Saturday instead of the cron "standard" of Monday-Friday. See: https://crontab.guru/#13_8,10,12,14,16_*_*_1-5

@HarHarLinks
Copy link
Collaborator

HarHarLinks commented Jul 27, 2021

from man 5 scrontab on debian:

day of week    0–7 (0 or 7 is Sun, or use names)

(confirms your standard)

@HarHarLinks
Copy link
Collaborator

HarHarLinks commented Jul 27, 2021

Does it only display Tue-Sat or also fire Tue-Sat?

With PR #83 (change of the displaying library) applied: `!remindme cron 13 8 * * 1; Get up, take a break, get some water` > At 08:13 every Monday (13 8 * * 1); next run in 6 days; "Get up, take a break, get some water"

actually the parsing seems to work same in both libraries, it's only a parser issue when setting up the reminder.

@th0mcat
Copy link
Contributor Author

th0mcat commented Jul 27, 2021

Okay, so it looks like setting a single day (I.e. * 9 * * 2) and commas (* 9 * * 2,3,4) work just fine, so it looks like the issue is setting a range.

@chagai95
Copy link

chagai95 commented Nov 9, 2021

Running a command for Wednesday on Tuesday returns this message:
At 11:10 every Tuesday (10 11 * * 2); next run in 23 hours; "test for Chagai"

@HarHarLinks
Copy link
Collaborator

adding a reminder for cron 10 11 * * 2 like that and listing it afterwards prints the above line for me.
To point out what's wrong here:

  • 0 or 7 is Sun -> 2 should be Tuesday which it prints correctly
  • it is currently Tuesday and will be Wednesday "in 23 hours". this is in line with the original issue of the day-of-week value being delayed by +1d

@HarHarLinks HarHarLinks added the bug Something isn't working label Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants