You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "shreyaskj-0710 (via GitHub)" <gi...@apache.org> on 2025/08/19 06:23:36 UTC
[PR] Fix cron expression display for Day-of-Month and Day-of-Week conflicts [airflow]
shreyaskj-0710 opened a new pull request, #54644:
URL: https://github.com/apache/airflow/pull/54644
Fixes #54482
**Description**
_📌 Day-of-Month (DOM) and Day-of-Week (DOW) Conflict in Cron_
In cron syntax, both Day-of-Month (DOM) and Day-of-Week (DOW) fields are evaluated independently.
If both are specified, the schedule runs when either condition matches (logical OR), not when both are true together.
_Example_
Cron expression : * * */1 * 5
*/1 → effectively means every day of the month
5 → every Friday
Together → Every minute (or) Every minute, only on Friday (but since */1 means every day, the Friday part becomes
redundant).
⚠️ This often causes confusion because users may expect it to mean “every Friday only” when in reality it matches “every day”.
**Approach**
- Detect when both DOM (Day of the month) and DOW (Day of the week) are restricted (i.e., not "*").
- Then split the expression into two variants:
- One ignoring DOW (DOM only)
- One ignoring DOM (DOW only)
Each variant is described independently, and the final description combines them using “(or)”, which matches actual cron semantics.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix cron expression display for Day-of-Month and Day-of-Week conflicts [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #54644:
URL: https://github.com/apache/airflow/pull/54644#issuecomment-3352684260
### Backport successfully created: v3-1-test
<table>
<tr>
<th>Status</th>
<th>Branch</th>
<th>Result</th>
</tr>
<tr>
<td>✅</td>
<td>v3-1-test</td>
<td><a href="https://github.com/apache/airflow/pull/56255"><img src="https://img.shields.io/badge/PR-56255-blue" alt="PR Link"></a></td>
</tr>
</table>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix cron expression display for Day-of-Month and Day-of-Week conflicts [airflow]
Posted by "shreyaskj-0710 (via GitHub)" <gi...@apache.org>.
shreyaskj-0710 commented on PR #54644:
URL: https://github.com/apache/airflow/pull/54644#issuecomment-3218863413
Hi @pierrejeambrun , @kaxil
can you please review the changes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix cron expression display for Day-of-Month and Day-of-Week conflicts [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on PR #54644:
URL: https://github.com/apache/airflow/pull/54644#issuecomment-3306488541
> This is the only bug that I'm aware of. Other descriptions appear accurate.
Glad to hear. I think we can move forward then.
@shreyaskj-0710 Do you mind rebasing the PR and fixing the CI please.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix cron expression display for Day-of-Month and Day-of-Week conflicts [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun merged PR #54644:
URL: https://github.com/apache/airflow/pull/54644
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix cron expression display for Day-of-Month and Day-of-Week conflicts [airflow]
Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on PR #54644:
URL: https://github.com/apache/airflow/pull/54644#issuecomment-3293694771
I mean if this is a more accurate description then sure. I also see the cron-descriptor has the same bug. Looks like we need to rebase and fix some tests though.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix cron expression display for Day-of-Month and Day-of-Week conflicts [airflow]
Posted by "shreyaskj-0710 (via GitHub)" <gi...@apache.org>.
shreyaskj-0710 commented on PR #54644:
URL: https://github.com/apache/airflow/pull/54644#issuecomment-3248538056
> At first I'm not in favor of this change. I don't really understand why this is needed. I would keep the standard cron description, if users cannot read cron expressions, they should go check the documentation. (I'm not strongly against it if this helps users)
>
> Can you add relevant tests please.
Hi @pierrejeambrun ,
Have added the tests
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix cron expression display for Day-of-Month and Day-of-Week conflicts [airflow]
Posted by "RNHTTR (via GitHub)" <gi...@apache.org>.
RNHTTR commented on PR #54644:
URL: https://github.com/apache/airflow/pull/54644#issuecomment-3300143100
> I mean if this is a more accurate description then sure. I also see the cron-descriptor has the same bug. Looks like we need to rebase and fix some tests though.
it's not just more accurate; the existing description is explicitly incorrect
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix cron expression display for Day-of-Month and Day-of-Week conflicts [airflow]
Posted by "RNHTTR (via GitHub)" <gi...@apache.org>.
RNHTTR commented on PR #54644:
URL: https://github.com/apache/airflow/pull/54644#issuecomment-3303983968
> Is that the only known 'bug' in the cron description?
This is the only bug that I'm aware of. Other descriptions appear accurate.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix cron expression display for Day-of-Month and Day-of-Week conflicts [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on PR #54644:
URL: https://github.com/apache/airflow/pull/54644#issuecomment-3302338001
There must be something I do not understand, for instance if we take a look at this thread https://stackoverflow.com/questions/34357126/why-crontab-uses-or-when-both-day-of-month-and-day-of-week-specified
It looks like this is the expected behavior when both Day-of-Month and Day-of-Week are specified? As mentioned in the POSIX standard there https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html
> The existing description is objectively incorrect.
What do you mean by that, am I missing something?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix cron expression display for Day-of-Month and Day-of-Week conflicts [airflow]
Posted by "shreyaskj-0710 (via GitHub)" <gi...@apache.org>.
shreyaskj-0710 commented on PR #54644:
URL: https://github.com/apache/airflow/pull/54644#issuecomment-3213012821
Hi @uranusjr ,
can you please review the code changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix cron expression display for Day-of-Month and Day-of-Week conflicts [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on PR #54644:
URL: https://github.com/apache/airflow/pull/54644#issuecomment-3254346000
@bbovenzi @uranusjr any opinion on that?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix cron expression display for Day-of-Month and Day-of-Week conflicts [airflow]
Posted by "shreyaskj-0710 (via GitHub)" <gi...@apache.org>.
shreyaskj-0710 commented on PR #54644:
URL: https://github.com/apache/airflow/pull/54644#issuecomment-3327771915
> > This is the only bug that I'm aware of. Other descriptions appear accurate.
>
> Glad to hear. I think we can move forward then.
>
> @shreyaskj-0710 Do you mind rebasing the PR and fixing the CI please.
Hi @pierrejeambrun ,
Have updated the PR and fixed the CI
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org